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.
37 38 39 |
# File 'mod/03_machines/lib/card/machine.rb', line 37 def output_config @output_config end |
Instance Method Details
#collect_input_cards(&block) ⇒ Object
39 40 41 |
# File 'mod/03_machines/lib/card/machine.rb', line 39 def collect_input_cards &block define_method :engine_input, &block end |
#machine_engine(&block) ⇒ Object
47 48 49 |
# File 'mod/03_machines/lib/card/machine.rb', line 47 def machine_engine &block define_method :engine, &block end |
#prepare_machine_input(&block) ⇒ Object
43 44 45 |
# File 'mod/03_machines/lib/card/machine.rb', line 43 def prepare_machine_input &block define_method :before_engine, &block end |
#store_machine_output(args = {}, &block) ⇒ Object
51 52 53 54 55 |
# File 'mod/03_machines/lib/card/machine.rb', line 51 def store_machine_output args={}, &block output_config.merge!(args) return unless block_given? define_method :after_engine, &block end |