Module: Card::Machine::ClassMethods
- Defined in:
- mod/03_machines/lib/card/machine.rb
Instance Attribute Summary collapse
-
#output_config ⇒ Object
Returns the value of attribute output_config.
Instance Method Summary collapse
- #collect_input_cards(&block) ⇒ Object
- #machine_engine(&block) ⇒ Object
- #prepare_machine_input(&block) ⇒ Object
- #store_machine_output(args = {}, &block) ⇒ Object
Instance Attribute Details
#output_config ⇒ Object
Returns the value of attribute output_config.
28 29 30 |
# File 'mod/03_machines/lib/card/machine.rb', line 28 def output_config @output_config end |
Instance Method Details
#collect_input_cards(&block) ⇒ Object
30 31 32 |
# File 'mod/03_machines/lib/card/machine.rb', line 30 def collect_input_cards &block define_method :engine_input, &block end |
#machine_engine(&block) ⇒ Object
38 39 40 |
# File 'mod/03_machines/lib/card/machine.rb', line 38 def machine_engine &block define_method :engine, &block end |
#prepare_machine_input(&block) ⇒ Object
34 35 36 |
# File 'mod/03_machines/lib/card/machine.rb', line 34 def prepare_machine_input &block define_method :before_engine, &block end |
#store_machine_output(args = {}, &block) ⇒ Object
42 43 44 45 46 47 |
# File 'mod/03_machines/lib/card/machine.rb', line 42 def store_machine_output args={}, &block output_config.merge!(args) if block_given? define_method :after_engine, &block end end |