⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Object
/
View File Name :
method-i.ri
U:RDoc::AnyMethod[iI"method:ETI"Object#method;TF:publico: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