lib/grumlin/shortcut.rb in grumlin-0.19.7 vs lib/grumlin/shortcut.rb in grumlin-0.20.0

- old
+ new

@@ -7,16 +7,21 @@ attr_reader :name, :block def_delegator :@block, :arity def_delegator :@block, :source_location - def initialize(name, &block) + def initialize(name, lazy: true, &block) @name = name + @lazy = lazy @block = block end def ==(other) @name == other.name && @block == other.block + end + + def lazy? + @lazy end # TODO: to_s, inspect, preview def apply(object, *args, **params)