⚝
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
/
BasicObject
/
View File Name :
method_missing-i.ri
U:RDoc::AnyMethod[iI"method_missing:ETI"BasicObject#method_missing;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"IInvoked by Ruby when <i>obj</i> is sent a message it cannot handle. ;TI"H<i>symbol</i> is the symbol for the method called, and <i>args</i> ;TI"Kare any arguments that were passed to it. By default, the interpreter ;TI"Iraises an error when this method is called. However, it is possible ;TI">to override the method to provide more dynamic behavior. ;TI"KIf it is decided that a particular method should not be handled, then ;TI"F<i>super</i> should be called, so that ancestors can pick up the ;TI"missing method. ;TI"The example below creates ;TI"Fa class <code>Roman</code>, which responds to methods with names ;TI"Gconsisting of roman numerals, returning the corresponding integer ;TI"values.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"class Roman ;TI" def roman_to_int(str) ;TI" # ... ;TI" end ;TI" ;TI") def method_missing(symbol, *args) ;TI" str = symbol.id2name ;TI" begin ;TI" roman_to_int(str) ;TI" rescue ;TI" super(symbol, *args) ;TI" end ;TI" end ;TI" end ;TI" ;TI"r = Roman.new ;TI"r.iv #=> 4 ;TI"r.xxiii #=> 23 ;TI"r.mm #=> 2000 ;TI" r.foo #=> NoMethodError;T:@format0: @fileI"vm_eval.c;T:0@omit_headings_from_table_of_contents_below0I"7obj.method_missing(symbol [, *args] ) -> result ;T0[ I"(*args);T@0FI"BasicObject;TcRDoc::NormalClass00