Class: Celsius::Transformation::Step
- Inherits:
-
Object
- Object
- Celsius::Transformation::Step
- Defined in:
- lib/celsius/transformation/step.rb
Instance Attribute Summary collapse
-
#transformation ⇒ Object
Returns the value of attribute transformation.
Instance Method Summary collapse
-
#initialize(transformation) ⇒ Step
constructor
A new instance of Step.
-
#method_missing(method_name, *args, &block) ⇒ Object
Each step has transparent access to all methods of it’s transformation.
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(transformation) ⇒ Step
Returns a new instance of Step.
4 5 6 |
# File 'lib/celsius/transformation/step.rb', line 4 def initialize(transformation) @transformation = transformation end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
Each step has transparent access to all methods of it’s transformation
11 12 13 14 15 16 17 |
# File 'lib/celsius/transformation/step.rb', line 11 def method_missing(method_name, *args, &block) if @transformation.respond_to?(method_name) @transformation.send(method_name, *args, &block) else super end end |
Instance Attribute Details
#transformation ⇒ Object
Returns the value of attribute transformation.
2 3 4 |
# File 'lib/celsius/transformation/step.rb', line 2 def transformation @transformation end |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
19 20 21 |
# File 'lib/celsius/transformation/step.rb', line 19 def respond_to_missing?(method_name, include_private = false) @transformation.respond_to?(method_name) || super end |