lib/grumlin/anonymous_step.rb in grumlin-0.12.5 vs lib/grumlin/anonymous_step.rb in grumlin-0.13.0
- old
+ new
@@ -16,26 +16,24 @@
@args = args
end
SUPPORTED_STEPS.each do |step|
define_method(step) do |*args|
- add_step(step, args)
+ step(step, args)
end
end
+ def step(name, args)
+ self.class.new(name, *args, previous_step: self)
+ end
+
def inspect
bytecode.inspect
end
alias to_s inspect
def bytecode(no_return: false)
@bytecode ||= Bytecode.new(self, no_return: no_return)
- end
-
- private
-
- def add_step(step_name, args)
- self.class.new(step_name, *args, previous_step: self)
end
end
end