Class: SRL::Race::Entrant
- Inherits:
-
Object
- Object
- SRL::Race::Entrant
- Includes:
- Unmarshalable
- Defined in:
- lib/srl/typedefs.rb
Instance Attribute Summary collapse
-
#displayname ⇒ Object
(also: #name)
readonly
This entrant’s player name.
-
#message ⇒ Object
(also: #comment)
readonly
The comment entered by this entrant for this race, if applicable.
-
#place ⇒ Object
(also: #position)
readonly
The position that this entrant finished this race in.
-
#statetext ⇒ Object
readonly
The state of this entrant in the race.
-
#time ⇒ Object
readonly
The number of seconds that this entrant took to complete the race goal.
-
#twitch ⇒ Object
readonly
This entrant’s Twitch account name.
Instance Method Summary collapse
-
#forfeit? ⇒ Boolean
Did this entrant forfeit the race?.
Methods included from Unmarshalable
Instance Attribute Details
#displayname ⇒ Object (readonly) Also known as: name
This entrant’s player name.
130 131 132 |
# File 'lib/srl/typedefs.rb', line 130 def displayname @displayname end |
#message ⇒ Object (readonly) Also known as: comment
The comment entered by this entrant for this race, if applicable.
142 143 144 |
# File 'lib/srl/typedefs.rb', line 142 def @message end |
#place ⇒ Object (readonly) Also known as: position
The position that this entrant finished this race in.
137 138 139 |
# File 'lib/srl/typedefs.rb', line 137 def place @place end |
#statetext ⇒ Object (readonly)
The state of this entrant in the race. Is he ready, finished, neither?
- FIXME
-
Switch to an enum-like implementation with symbols.
161 162 163 |
# File 'lib/srl/typedefs.rb', line 161 def statetext @statetext end |
#time ⇒ Object (readonly)
The number of seconds that this entrant took to complete the race goal.
Notes
A time of -1 indicates a forfeit.
150 151 152 |
# File 'lib/srl/typedefs.rb', line 150 def time @time end |
#twitch ⇒ Object (readonly)
This entrant’s Twitch account name.
134 135 136 |
# File 'lib/srl/typedefs.rb', line 134 def twitch @twitch end |
Instance Method Details
#forfeit? ⇒ Boolean
Did this entrant forfeit the race?
153 154 155 |
# File 'lib/srl/typedefs.rb', line 153 def forfeit? time == -1 end |