lib/grumlin/steps.rb in grumlin-0.19.7 vs lib/grumlin/steps.rb in grumlin-0.20.0
- old
+ new
@@ -9,11 +9,11 @@
raise ArgumentError, "expected: #{Action}, given: #{action.class}" unless action.is_a?(Action)
shortcuts = action.shortcuts
actions = []
- until action.nil?
+ until action.nil? || action.is_a?(TraversalStart)
actions.unshift(action)
action = action.previous_step
end
new(shortcuts).tap do |chain|
@@ -54,10 +54,10 @@
private
def shortcuts?(steps_ary)
steps_ary.any? do |step|
- @shortcuts.include?(step.name) || step.args.any? do |arg|
+ @shortcuts.known?(step.name) || step.args.any? do |arg|
arg.is_a?(Steps) ? arg.uses_shortcuts? : false
end
end
end