lib/grumlin/shortcut_proxy.rb in grumlin-0.13.1 vs lib/grumlin/shortcut_proxy.rb in grumlin-0.14.0
- old
+ new
@@ -11,15 +11,15 @@
@object = object
@shortcuts = shortcuts
@parent = parent
end
- def method_missing(name, *args)
- return @parent.public_send(name, *args) if %i[__ g].include?(name) && !@parent.nil?
+ def method_missing(name, *args, **params)
+ return @parent.public_send(name, *args, **params) if %i[__ g].include?(name) && !@parent.nil?
- return wrap_result(@object.public_send(name, *args)) if @object.respond_to?(name)
+ return wrap_result(@object.public_send(name, *args, **params)) if @object.respond_to?(name)
- return wrap_result(instance_exec(*args, &@shortcuts[name])) if @shortcuts.key?(name)
+ return wrap_result(instance_exec(*args, **params, &@shortcuts[name])) if @shortcuts.key?(name)
super
end
# For some reason the interpreter thinks it's private