Sha256: a9936f7ec6ea463967db940fcc0dfb160082b0e4cf5009095672e9b254948aa9

Contents?: true

Size: 445 Bytes

Versions: 34

Compression:

Stored size: 445 Bytes

Contents

# frozen_string_literal: true

module Grumlin
  module Expressions
    module 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, TypedValue.new(type: tool_name, value: step))
          end
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
grumlin-0.23.0 lib/grumlin/expressions/expression.rb
grumlin-0.22.5 lib/grumlin/expressions/expression.rb
grumlin-0.22.4 lib/grumlin/expressions/expression.rb
grumlin-0.22.3 lib/grumlin/expressions/expression.rb
grumlin-0.22.2 lib/grumlin/expressions/expression.rb
grumlin-0.22.1 lib/grumlin/expressions/expression.rb
grumlin-0.22.0 lib/grumlin/expressions/expression.rb
grumlin-0.21.1 lib/grumlin/expressions/expression.rb
grumlin-0.21.0 lib/grumlin/expressions/expression.rb
grumlin-0.20.2 lib/grumlin/expressions/expression.rb
grumlin-0.20.1 lib/grumlin/expressions/expression.rb
grumlin-0.20.0 lib/grumlin/expressions/expression.rb
grumlin-0.19.7 lib/grumlin/expressions/expression.rb
grumlin-0.19.6 lib/grumlin/expressions/expression.rb
grumlin-0.19.5 lib/grumlin/expressions/expression.rb
grumlin-0.19.4 lib/grumlin/expressions/expression.rb
grumlin-0.19.3 lib/grumlin/expressions/expression.rb
grumlin-0.19.2 lib/grumlin/expressions/expression.rb
grumlin-0.19.1 lib/grumlin/expressions/expression.rb
grumlin-0.19.0 lib/grumlin/expressions/expression.rb