Module: Grammar::Attributes
- Included in:
- Gamefic::Entity
- Defined in:
- lib/gamefic-standard/grammar/attributes.rb
Overview
A collection of attributes that enable grammar features for entities, such as selecting their correct pronouns.
Instance Attribute Summary collapse
-
#gender ⇒ Symbol
The gender of the object.
- #plural ⇒ Object writeonly
Instance Method Summary collapse
-
#person ⇒ Object
For now, the object’s person is always assumed to be third (he/she/it/they).
-
#plural? ⇒ Boolean
True if the object should be referred to in the plural, e.g., “they” instead of “it.”.
Instance Attribute Details
#gender ⇒ Symbol
The gender of the object. Supported values are :male, :female, :neutral, and :other. Use :neutral for objects that don’t have a gender (i.e., “it”). Use :other for people or characters that have an unspecified or non-binary gender (i.e., “they”).
18 19 20 |
# File 'lib/gamefic-standard/grammar/attributes.rb', line 18 def gender @gender ||= :neutral end |
#plural=(value) ⇒ Object (writeonly)
10 11 12 |
# File 'lib/gamefic-standard/grammar/attributes.rb', line 10 def plural=(value) @plural = value end |
Instance Method Details
#person ⇒ Object
For now, the object’s person is always assumed to be third (he/she/it/they). A future version of this library might support first (I/me) and second (you).
33 34 35 |
# File 'lib/gamefic-standard/grammar/attributes.rb', line 33 def person 3 end |
#plural? ⇒ Boolean
True if the object should be referred to in the plural, e.g., “they” instead of “it.”
26 27 28 |
# File 'lib/gamefic-standard/grammar/attributes.rb', line 26 def plural? @plural ||= false end |