> For the complete documentation index, see [llms.txt](https://enls.gitbook.io/rgss-reference-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enls.gitbook.io/rgss-reference-manual/standard-library/built-in-classes/object/module.md).

# 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:

```
def name
  @name
end
def name=(val)
  @name = val
end
```

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:

```
def name
  @name
end
```

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:

```
def name=(val)
  @name = val
end
```

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.

```
class C
  include FileTest
  include Math
end
```

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.
