lib/grumlin/shortcuts.rb in grumlin-0.15.3 vs lib/grumlin/shortcuts.rb in grumlin-0.15.4

- old
+ new

@@ -19,10 +19,13 @@ end def shortcut(name, &block) name = name.to_sym # TODO: blocklist of names to avoid conflicts with standard methods? - raise ArgumentError, "cannot use names of standard gremlin steps" if Grumlin.supported_steps.include?(name) + if Grumlin::AnonymousStep::SUPPORTED_STEPS.include?(name) + raise ArgumentError, + "cannot use names of standard gremlin steps" + end raise ArgumentError, "shortcut '#{name}' already exists" if shortcuts.key?(name) && shortcuts[name] != block shortcuts[name] = block end