D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Module
/
Filename :
attr_accessor-i.ri
back
Copy
U:RDoc::AnyMethod[iI"attr_accessor:ETI"Module#attr_accessor;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"BDefines a named attribute for this module, where the name is ;TI"G<i>symbol.</i><code>id2name</code>, creating an instance variable ;TI"H(<code>@name</code>) and a corresponding access method to read it. ;TI"KAlso creates a method called <code>name=</code> to set the attribute. ;TI"0String arguments are converted to symbols. ;TI"9Returns an array of defined method names as symbols.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [ I"module Mod ;TI"@ attr_accessor(:one, :two) #=> [:one, :one=, :two, :two=] ;TI" end ;TI"?Mod.instance_methods.sort #=> [:one, :one=, :two, :two=];T:@format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Sattr_accessor(symbol, ...) -> array attr_accessor(string, ...) -> array ;T0[ I"(*args);T@FI"Module;TcRDoc::NormalClass00