Low commit activity in last 3 years
No release in over a year
Dry interactor initializer
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0
~> 3.0
 Project Readme

Interactor::Initializer

Build Status Gem Version

Dry interactor initializer

Installation

Add this line to your application's Gemfile:

gem 'interactor-initializer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install interactor-initializer

Usage

Example:

class Vouchers::Issue
 include Interactor::Initializer

 initialize_with :user

 def run
   puts "Voucher issued for #{user.full_name}"
 end
end
Vouchers::Issue.for(user)
=> Voucher issued for Jonas Jonaitis

Interactor could be called with: .for, .with or .run

if keyword params are needed: initialize_with_keyword_params should be used instead of initialize_with

initialize_with_keyword_params :user
Vouchers::Issue.for(user: good_user)