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

Instance Method Summary collapse

Instance Attribute Details

#genderSymbol

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”).

Returns:

  • (Symbol)


18
19
20
# File 'lib/gamefic-standard/grammar/attributes.rb', line 18

def gender
  @gender ||= :neutral
end

#plural=(value) ⇒ Object (writeonly)

See Also:



10
11
12
# File 'lib/gamefic-standard/grammar/attributes.rb', line 10

def plural=(value)
  @plural = value
end

Instance Method Details

#personObject

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.”

Returns:

  • (Boolean)


26
27
28
# File 'lib/gamefic-standard/grammar/attributes.rb', line 26

def plural?
  @plural ||= false
end