From 4b79f6e9c4b891444d5e94beffe44b60d9882985 Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Sat, 5 Oct 2013 12:10:37 +0200 Subject: [PATCH] More robust yard handler for transitions --- lib/state_machine/yard/handlers/transition.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/state_machine/yard/handlers/transition.rb b/lib/state_machine/yard/handlers/transition.rb index 11aaf58f..9ab4a59b 100644 --- a/lib/state_machine/yard/handlers/transition.rb +++ b/lib/state_machine/yard/handlers/transition.rb @@ -13,7 +13,7 @@ def process ast = statement.parameters.first ast.children.each do |assoc| # Skip conditionals - next if %w(if unless).include?(assoc[0].jump(:ident).source) + next if %w(if :if unless :unless).include?(assoc[0].jump(:ident).source) options[extract_requirement(assoc[0])] = extract_requirement(assoc[1]) end