Module: ActiveInteractor::Organizer::Organize::ClassMethods
- Included in:
- Base
- Defined in:
- lib/active_interactor/organizer/organize.rb
Overview
Organizer organize class methods. Because ClassMethods is a module classes should extend ClassMethods rather than inherit from it.
Instance Method Summary collapse
-
#organize(*interactors, &block) ⇒ InteractorInterfaceCollection
Organize interactors to be called by the organizer.
-
#organized ⇒ InteractorInterfaceCollection
An organized collection of interactors.
Instance Method Details
#organize(*interactors, &block) ⇒ InteractorInterfaceCollection
Organize interactors to be called by the organizer. A block will be evaluated on the InteractorInterfaceCollection if a block is given.
52 53 54 55 56 |
# File 'lib/active_interactor/organizer/organize.rb', line 52 def organize(*interactors, &block) organized.concat(interactors) if interactors organized.instance_eval(&block) if block organized end |
#organized ⇒ InteractorInterfaceCollection
An organized collection of interactors
61 62 63 |
# File 'lib/active_interactor/organizer/organize.rb', line 61 def organized @organized ||= ActiveInteractor::Organizer::InteractorInterfaceCollection.new end |