Class: Pymn::ChainOfResponsibility::Factory::FactoryCommand

Inherits:
Object
  • Object
show all
Includes:
HasHandlers
Defined in:
lib/pymn/chain_of_responsibility/factory.rb

Instance Method Summary collapse

Methods included from HasHandlers

#add_handler

Constructor Details

#initialize(target, factory_method, can_handle_block) ⇒ FactoryCommand

Returns a new instance of FactoryCommand.



30
31
32
33
34
35
# File 'lib/pymn/chain_of_responsibility/factory.rb', line 30

def initialize(target, factory_method, can_handle_block)
  create_method(factory_method)
  @factory_method = factory_method
  @target = target
  @can_handle_block = can_handle_block
end