Module: Card::Machine::ClassMethods
- Defined in:
- mod/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.
38 39 40 |
# File 'mod/machines/lib/card/machine.rb', line 38 def output_config @output_config end |
Instance Method Details
#collect_input_cards(&block) ⇒ Object
40 41 42 |
# File 'mod/machines/lib/card/machine.rb', line 40 def collect_input_cards &block define_method :engine_input, &block end |
#machine_engine(&block) ⇒ Object
48 49 50 |
# File 'mod/machines/lib/card/machine.rb', line 48 def machine_engine &block define_method :engine, &block end |
#prepare_machine_input(&block) ⇒ Object
44 45 46 |
# File 'mod/machines/lib/card/machine.rb', line 44 def prepare_machine_input &block define_method :before_engine, &block end |
#store_machine_output(args = {}, &block) ⇒ Object
52 53 54 55 56 |
# File 'mod/machines/lib/card/machine.rb', line 52 def store_machine_output args={}, &block output_config.merge!(args) return unless block_given? define_method :after_engine, &block end |