Module
The module class.
attr_accessor(name ... )
Defines both the read and write methods for the attribute name, where name is specified by Symbol or a string.
The definition of the method defined by attr_accessor is as follows:
attr_reader(name ... )
Defines the read method for the attribute name, where name is specified by Symbol or a string.
The definition of the method defined by attr_reader is as follows:
attr_writer(name ... )
Defines the writer method for the specified attribute(s).
Defines the write method for the attribute name (name=), where name is specified by Symbol or a string.
The definition of the method defined by attr_writer is as follows:
include(module ... )
Includes the specified modules' properties (methods and constants). Returns self. include is used to implement a mix-in in place of a multiple inheritance.
Module capabilities are included by inserting modules into a class inheritance. Therefore, when searching for methods, included modules will be given priority over superclasses.
If the same module is included two or more times, the second and later instances will be ignored. Furthermore, executing an include that results in a recursive module inheritance will throw an ArgumentError exception.
Last updated