Class: Celsius::Transformation::Step

Inherits:
Object
  • Object
show all
Defined in:
lib/celsius/transformation/step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#transformationObject

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

Returns:

  • (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