ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
U:RDoc::AnyMethod[iI"method:ETI"Object#method;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"HLooks up the named method as a receiver in obj, returning a ;TI"GMethod object (or raising NameError). The Method object acts as a ;TI"Hclosure in obj's object instance, so instance variables and ;TI"5the value of self remain available.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"class Demo
;TI" def initialize(n)
;TI" @iv = n
;TI" end
;TI" def hello()
;TI" "Hello, @iv = #{@iv}"
;TI" end
;TI" end
;TI"
;TI"k = Demo.new(99)
;TI"m = k.method(:hello)
;TI"$m.call #=> "Hello, @iv = 99"
;TI"
;TI"l = Demo.new('Fred')
;TI"m = l.method("hello")
;TI"&m.call #=> "Hello, @iv = Fred"
;T:@format0o;
; [I"DNote that Method implements to_proc method, which ;TI")means it can be used with iterators.;T@o;; [
I"D[ 1, 2, 3 ].each(&method(:puts)) # => prints 3 lines to stdout
;TI"
;TI"&out = File.open('test.txt', 'w')
;TI"F[ 1, 2, 3 ].each(&out.method(:puts)) # => prints 3 lines to file
;TI"
;TI"require 'date'
;TI"=%w[2017-03-01 2017-03-02].collect(&Date.method(:parse))
;TI"s#=> [#, #];T;
0:
@fileI"proc.c;T:0@omit_headings_from_table_of_contents_below0I""obj.method(sym) -> method
;T0[ I" (p1);T@2FI"Object;TcRDoc::NormalClass00