Sha256: cf3b8f8e7f050ca50c323c1f873ff6fe8fb1ee6bdd0777eded503d5875fe95e7

Contents?: true

Size: 386 Bytes

Versions: 15

Compression:

Stored size: 386 Bytes

Contents

# frozen_string_literal: true

module Grumlin::Expressions::Expression
  def define_steps(steps, tool_name)
    steps.each do |step|
      define_method step do
        name = "@#{step}"
        return instance_variable_get(name) if instance_variable_defined?(name)

        instance_variable_set(name, Grumlin::TypedValue.new(type: tool_name, value: step))
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
grumlin-1.2.0 lib/grumlin/expressions/expression.rb
grumlin-1.1.0 lib/grumlin/expressions/expression.rb
grumlin-1.0.4 lib/grumlin/expressions/expression.rb
grumlin-1.0.3 lib/grumlin/expressions/expression.rb
grumlin-1.0.3.beta1 lib/grumlin/expressions/expression.rb
grumlin-1.0.2 lib/grumlin/expressions/expression.rb
grumlin-1.0.1 lib/grumlin/expressions/expression.rb
grumlin-1.0.0 lib/grumlin/expressions/expression.rb
grumlin-1.0.0.rc7 lib/grumlin/expressions/expression.rb
grumlin-1.0.0.rc6 lib/grumlin/expressions/expression.rb
grumlin-1.0.0.rc5 lib/grumlin/expressions/expression.rb
grumlin-1.0.0.rc4 lib/grumlin/expressions/expression.rb
grumlin-1.0.0.rc3 lib/grumlin/expressions/expression.rb
grumlin-1.0.0.rc2 lib/grumlin/expressions/expression.rb
grumlin-1.0.0.rc1 lib/grumlin/expressions/expression.rb