class ChgkRating::Models::TournamentTeam
Attributes
team[R]
tournament[R]
Public Class Methods
new(team_or_hash, params = {})
click to toggle source
Calls superclass method
ChgkRating::Models::Base::new
# File lib/chgk_rating/models/tournament_team.rb, line 8 def initialize(team_or_hash, params = {}) @team = build_model team_or_hash @tournament = build_model params[:tournament], ChgkRating::Models::Tournament super extract_id_from(team_or_hash), params end
Public Instance Methods
players()
click to toggle source
Returns an array-like TournamentPlayers collection containing roster for the current TournamentTeam
@return [ChgkRating::Collection::TournamentPlayers] The collection of results.
# File lib/chgk_rating/models/tournament_team.rb, line 17 def players ChgkRating::Collections::TournamentPlayers.new tournament: @tournament, team: @team end
results()
click to toggle source
Returns an array-like TournamentTeamResults collection containing results for the current TournamentTeam
@return [ChgkRating::Collection::TournamentTeamResults] The collection of results.
# File lib/chgk_rating/models/tournament_team.rb, line 24 def results ChgkRating::Collections::TournamentTeamResults.new tournament: @tournament, team: @team end