mdoc2man 2

mdoc2man(i, o) Instance Public methods

parse_macro

parse_macro(line) Instance Public methods

==

meth == other_meth â true or false Instance Public methods Two method objects are equal if they are bound to the same object and refer to the same method definition and their owners are the same class or module.

[]

meth[args, ...] â obj Instance Public methods Invokes the meth with the specified arguments, returning the method's return value. m = 12.method("+") m.call(3) #=> 15 m.call(20) #=> 32

arity

meth.arity â fixnum Instance Public methods Returns an indication of the number of arguments accepted by a method. Returns a nonnegative integer for methods that take a fixed number of arguments. For Ruby methods that take a variable number of arguments, returns -n-1, where n is the number of required arguments. For methods written in C, returns -1 if the call takes a variable number of arguments. class C def one; end def two(a); end def three(*a); end def four(a, b

call

meth.call(args, ...) â obj Instance Public methods Invokes the meth with the specified arguments, returning the method's return value. m = 12.method("+") m.call(3) #=> 15 m.call(20) #=> 32

clone

method.clone â new_method Instance Public methods Returns a clone of this method. class A def foo return "bar" end end m = A.new.method(:foo) m.call # => "bar" n = m.clone.call # => "bar"

eql?

meth == other_meth â true or false Instance Public methods Two method objects are equal if they are bound to the same object and refer to the same method definition and their owners are the same class or module.

hash

meth.hash â integer Instance Public methods Returns a hash value corresponding to the method object.

inspect

meth.inspect â string Instance Public methods Returns the name of the underlying method. "cat".method(:count).inspect #=> "#<Method: String#count>"