⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.116
Server IP:
78.40.11.138
Server:
Linux tango.o2switch.net 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
Object
/
View File Name :
define_singleton_method-i.ri
U:RDoc::AnyMethod[iI"define_singleton_method:ETI"#Object#define_singleton_method;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"EDefines a public singleton method in the receiver. The _method_ ;TI"Iparameter can be a +Proc+, a +Method+ or an +UnboundMethod+ object. ;TI"=If a block is specified, it is used as the method body. ;TI"NIf a block or a method has parameters, they're used as method parameters.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I" class A ;TI" class << self ;TI" def class_name ;TI" to_s ;TI" end ;TI" end ;TI" end ;TI"-A.define_singleton_method(:who_am_i) do ;TI" "I am: #{class_name}" ;TI" end ;TI""A.who_am_i # ==> "I am: A" ;TI" ;TI"guy = "Bob" ;TI"Eguy.define_singleton_method(:hello) { "#{self}: Hello there!" } ;TI"+guy.hello #=> "Bob: Hello there!" ;TI" ;TI"chris = "Chris" ;TI"Schris.define_singleton_method(:greet) {|greeting| "#{greeting}, I'm Chris!" } ;TI"+chris.greet("Hi") #=> "Hi, I'm Chris!";T:@format0: @fileI"proc.c;T:0@omit_headings_from_table_of_contents_below0I"kdefine_singleton_method(symbol, method) -> symbol define_singleton_method(symbol) { block } -> symbol ;T0[ I"(*args);T@'FI"Object;TcRDoc::NormalClass00