class

SpdRns::Race

Inherits Reference < Object

Constructors

new(id : String = "<none>")
Source

Instance methods

add_observer(user : User)
Source
add_participant(user : User)

Add the given User to the Race with a certain role

Source
cancel
Source
close
Source
delete(reason : String = nil)
Source
elapsed_time
Source
end_time

Time at which the Race timer ended (all participants finished/DOFd)

Source
end_time=(end_time : Time | Nil)

Time at which the Race timer ended (all participants finished/DOFd)

Source
finish
Source
id

Unique ID for the Race

Source
id=(id : String)

Unique ID for the Race

Source
members

List of members currently involved in the Race

Source
members=(members : Array(Membership))

List of members currently involved in the Race

Source
membership(user) : Membership

Same as #member, but assumes the Member exists.

Source
membership?(user) : Membership | Nil

Return the Membership struct for the given User. Nil if the User is not a member of the Race

Source
modify
Source
observers

Return only the Memberships that are Observers of the Race

Source
open
Source
participants

Return only the Memberships that are Participants in the Race

Source
pause
Source
remove_membership(user : User)

Remove the given User's membership from the Race

Source
start
Source
start_time

Time at which the Race timer starts

Source
start_time=(start_time : Time | Nil)

Time at which the Race timer starts

Source
state

Current state of the Race

Source
state=(state : State)

Current state of the Race

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

Source
valid_actions
Source

Macros

ensure_state(state, ret_value = false)
Source

Nested types