class SpdRns::Race
- SpdRns::Race
- Reference
- Object
Defined in:
spdrns/race.crConstructors
Instance Method Summary
- #add_observer(user : User)
-
#add_participant(user : User)
Add the given User to the Race with a certain role
- #cancel
- #close
- #delete(reason : String = nil)
- #elapsed_time : Time::Span
-
#end_time : Time | Nil
Time at which the Race timer ended (all participants finished/DOFd)
-
#end_time=(end_time : Time | Nil)
Time at which the Race timer ended (all participants finished/DOFd)
- #finish
-
#id : String
Unique ID for the Race
-
#id=(id : String)
Unique ID for the Race
-
#members : Array(Membership)
List of members currently involved in the Race
-
#members=(members : Array(Membership))
List of members currently involved in the Race
-
#membership(user) : Membership
Same as #member, but assumes the Member exists.
-
#membership?(user) : Membership | Nil
Return the Membership struct for the given User.
- #modify
-
#observers : Array(Membership)
Return only the Memberships that are Observers of the Race
- #open
-
#participants : Array(Membership)
Return only the Memberships that are Participants in the Race
- #pause
-
#remove_membership(user : User)
Remove the given User's membership from the Race
- #start
-
#start_time : Time | Nil
Time at which the Race timer starts
-
#start_time=(start_time : Time | Nil)
Time at which the Race timer starts
-
#state : State
Current state of the Race
-
#state=(state : State)
Current state of the Race
-
#update_member(user, &)
Find the Member struct for the given User, passing it to
block
and replacing it in the Member list with the block's return value. - #valid_actions
Macro Summary
Constructor Detail
Instance Method Detail
Time at which the Race timer ended (all participants finished/DOFd)
Return the Membership struct for the given User. Nil if the User is not a member of the Race
Return only the Memberships that are Participants in the Race
Find the Member struct for the given User, passing it to block
and
replacing it in the Member list with the block's return value.