D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Module
/
Filename :
instance_methods-i.ri
back
Copy
U:RDoc::AnyMethod[iI"instance_methods:ETI"Module#instance_methods;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"PReturns an array containing the names of the public and protected instance ;FI"Xmethods in the receiver. For a module, these are the public and protected methods; ;FI"Qfor a class, they are the instance (not singleton) methods. If the optional ;FI"Tparameter is <code>false</code>, the methods of any ancestors are not included.;Fo:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"module A ;TI" def method1() end ;TI" end ;TI" class B ;TI" include A ;TI" def method2() end ;TI" end ;TI"class C < B ;TI" def method3() end ;TI" end ;TI" ;TI"@A.instance_methods(false) #=> [:method1] ;TI"@B.instance_methods(false) #=> [:method2] ;TI":B.instance_methods(true).include?(:method1) #=> true ;TI"@C.instance_methods(false) #=> [:method3] ;TI":C.instance_methods.include?(:method2) #=> true ;T:@format0o; ; [I"SNote that method visibility changes in the current class, as well as aliases, ;FI"Care considered as methods of the current class by this method:;F@o;; [ I"class C < B ;TI" alias method4 method2 ;TI" protected :method2 ;TI" end ;TI"TC.instance_methods(false).sort #=> [:method2, :method3, :method4];T; 0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"9mod.instance_methods(include_super=true) -> array ;F0[ I"(*args);T@/FI"Module;TcRDoc::NormalClass00