lib/grumlin/expressions/expression.rb in grumlin-0.23.0 vs lib/grumlin/expressions/expression.rb in grumlin-1.0.0.rc1

- old
+ new

@@ -1,18 +1,14 @@ # 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) +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, TypedValue.new(type: tool_name, value: step)) - end - end + instance_variable_set(name, Grumlin::TypedValue.new(type: tool_name, value: step)) end end end end