Class: UnboundMethod
Instance Method Summary collapse
-
#call(obj, *args, &block) ⇒ Object
Calls this method on
obj
with theargs
andblock
arguments.
Instance Method Details
#call(obj, *args, &block) ⇒ Object
Calls this method on obj
with the args
and block
arguments. This allows to have an uniform way to call methods on objects
4 5 6 |
# File 'lib/utilrb/unbound_method/call.rb', line 4 def call(obj, *args, &block) bind(obj).call(*args, &block) end |