Class: Foobara::Value::Processor::Runner
- Inherits:
-
Object
- Object
- Foobara::Value::Processor::Runner
- Defined in:
- foobara-0.0.110/projects/value/src/processor/runner.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#processor ⇒ Object
Returns the value of attribute processor.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(processor, value) ⇒ Runner
constructor
A new instance of Runner.
Constructor Details
#initialize(processor, value) ⇒ Runner
Returns a new instance of Runner.
23 24 25 26 |
# File 'foobara-0.0.110/projects/value/src/processor/runner.rb', line 23 def initialize(processor, value) self.processor = processor self.value = value end |
Instance Attribute Details
#processor ⇒ Object
Returns the value of attribute processor.
21 22 23 |
# File 'foobara-0.0.110/projects/value/src/processor/runner.rb', line 21 def processor @processor end |
#value ⇒ Object
Returns the value of attribute value.
21 22 23 |
# File 'foobara-0.0.110/projects/value/src/processor/runner.rb', line 21 def value @value end |
Class Method Details
.runner_methods(*method_names) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'foobara-0.0.110/projects/value/src/processor/runner.rb', line 6 def runner_methods(*method_names) method_names.each do |method_name| instance_variable = :"@#{method_name}" define_method method_name do if instance_variables.include?(instance_variable) instance_variable_get(instance_variable) else instance_variable_set(instance_variable, processor.send(method_name, value)) end end end end |