Class: SRL::Race::Entrant
- Inherits:
-
Object
- Object
- SRL::Race::Entrant
- Includes:
- Unmarshalable
- Defined in:
- lib/srl/race.rb
Overview
A participant in an active race.
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.
54 55 56 |
# File 'lib/srl/race.rb', line 54 def displayname @displayname end |
#message ⇒ Object (readonly) Also known as: comment
The comment entered by this entrant for this race, if applicable.
66 67 68 |
# File 'lib/srl/race.rb', line 66 def @message end |
#place ⇒ Object (readonly) Also known as: position
The position that this entrant finished this race in.
61 62 63 |
# File 'lib/srl/race.rb', line 61 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.
85 86 87 |
# File 'lib/srl/race.rb', line 85 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.
74 75 76 |
# File 'lib/srl/race.rb', line 74 def time @time end |
#twitch ⇒ Object (readonly)
This entrant’s Twitch account name.
58 59 60 |
# File 'lib/srl/race.rb', line 58 def twitch @twitch end |
Instance Method Details
#forfeit? ⇒ Boolean
Did this entrant forfeit the race?
77 78 79 |
# File 'lib/srl/race.rb', line 77 def forfeit? time == -1 end |