⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
UnboundMethod
/
View File Name :
cdesc-UnboundMethod.ri
U:RDoc::NormalClass[iI"UnboundMethod:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[ I"ERuby supports two forms of objectified methods. Class Method is ;TI"Eused to represent methods that are associated with a particular ;TI"Bobject: these method objects are bound to that object. Bound ;TI"Emethod objects for an object can be created using Object#method.;To:RDoc::Markup::BlankLine o; ;[ I"FRuby also supports unbound methods; methods objects that are not ;TI"Fassociated with a particular object. These can be created either ;TI"Hby calling Module#instance_method or by calling #unbind on a bound ;TI"Dmethod object. The result of both of these is an UnboundMethod ;TI"object.;T@o; ;[I"CUnbound methods can only be called after they are bound to an ;TI"Bobject. That object must be a kind_of? the method's original ;TI"class.;T@o:RDoc::Markup::Verbatim;[I"class Square ;TI" def area ;TI" @side * @side ;TI" end ;TI" def initialize(side) ;TI" @side = side ;TI" end ;TI" end ;TI" ;TI"-area_un = Square.instance_method(:area) ;TI" ;TI"s = Square.new(12) ;TI"area = area_un.bind(s) ;TI"area.call #=> 144 ;T:@format0o; ;[I"FUnbound methods are a reference to the method at the time it was ;TI"Fobjectified: subsequent changes to the underlying class will not ;TI"affect the unbound method.;T@o;;[I"class Test ;TI" def test ;TI" :original ;TI" end ;TI" end ;TI"&um = Test.instance_method(:test) ;TI"class Test ;TI" def test ;TI" :modified ;TI" end ;TI" end ;TI"t = Test.new ;TI"%t.test #=> :modified ;TI"$um.bind(t).call #=> :original;T;0: @fileI"proc.c;T:0@omit_headings_from_table_of_contents_below0; 0;0[ [ [ [[I" class;T[[:public[ [:protected[ [:private[ [I" instance;T[[;[[I"==;TI"proc.c;T[I" arity;T@Z[I" bind;T@Z[I"bind_call;T@Z[I" clone;T@Z[I" eql?;T@Z[I" hash;T@Z[I"inspect;T@Z[I" name;T@Z[I"original_name;T@Z[I" owner;T@Z[I"parameters;T@Z[I"source_location;T@Z[I"super_method;T@Z[I" to_s;T@Z[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ; 0;0[@E@EcRDoc::TopLevel