Class: SRL::Race
Defined Under Namespace
Classes: Entrant
Constant Summary collapse
- STATES =
[ :open, :unknown, :in_progress, :complete ].freeze
Instance Attribute Summary collapse
-
#entrants ⇒ Object
The players enlisted in this race as an array of Entrants.
-
#game ⇒ Object
The game associate with this race.
-
#oid ⇒ Object
(also: #channel)
readonly
The IRC channel suffix for this race.
-
#state ⇒ Object
readonly
The state of this race.
Instance Method Summary collapse
Methods included from Unmarshalable
Instance Attribute Details
#entrants ⇒ Object
The players enlisted in this race as an array of Entrants.
117 118 119 |
# File 'lib/srl/typedefs.rb', line 117 def entrants @entrants end |
#game ⇒ Object
The game associate with this race.
110 111 112 |
# File 'lib/srl/typedefs.rb', line 110 def game @game end |
#oid ⇒ Object (readonly) Also known as: channel
The IRC channel suffix for this race.
96 97 98 |
# File 'lib/srl/typedefs.rb', line 96 def oid @oid end |
#state ⇒ Object (readonly)
The state of this race. Entry Open / In Progress / Completed
- FIXME
-
Switch to enum-like behaviour with symbols.
101 102 103 |
# File 'lib/srl/typedefs.rb', line 101 def state @state end |
Instance Method Details
#status ⇒ Object
103 104 105 106 107 |
# File 'lib/srl/typedefs.rb', line 103 def status STATES[state - 1] rescue :unknown end |