Name
Method — Method object class
Synopsis
The method of
an object that has been made into an object in its own right. Created
using the method
obj
.method(
name
)
.
Instance Methods
m
[
arg...
]
m
.arity
Returns the number of arguments accepted by
m
. For methods that take a variable number of arguments, returns-n-1
, wheren
is the number of least required arguments.m
.call([
arg...
])
Calls a
method
object.m
.to_proc
Converts
m
into aProc
object.m
.unbind
Returns an
UnboundMethod
object corresponding tom
.
Get Ruby in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.