Sha256: 40d841244593fb847082e19cb4d8f96e62e5943ba8d2d50615662cf15e1e6cf5

Contents?: true

Size: 581 Bytes

Versions: 2

Compression:

Stored size: 581 Bytes

Contents

require_relative "../transformation"

class Skala::Transformation::Step
  attr_accessor :transformation

  def initialize(transformation)
    @transformation = transformation
  end

  #
  # Each step has transparent access to all methods of it's transformation
  #
  def method_missing(method_name, *args, &block)
    if @transformation.respond_to?(method_name)
      @transformation.send(method_name, *args, &block)
    else
      super
    end
  end

  def respond_to_missing?(method_name, include_private = false)
    @transformation.respond_to?(method_name) || super
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
skala-0.3.0 lib/skala/transformation/step.rb
skala-0.2.0 lib/skala/transformation/step.rb