Class: ChgkRating::Models::Tournament
- Inherits:
-
Base
- Object
- ChgkObject
- Base
- ChgkRating::Models::Tournament
- Defined in:
- lib/chgk_rating/models/tournament/tournament.rb
Constant Summary
Constants included from Connection
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#team_by(team_or_id) ⇒ ChgkRating::Models::TournamentTeam
Returns information about a single TournamentTeam in the current tournament.
-
#team_list ⇒ ChgkRating::Collection::Ratings
Returns an array-like TournamentTeams collection specifying which teams participated in the current tournament.
-
#team_players(team_or_id) ⇒ ChgkRating::Collection::TournamentTeamPlayers
Returns an array-like TournamentTeamPlayers collection containing roster for a team at the current tournament.
-
#team_results(team_or_id) ⇒ ChgkRating::Collection::TournamentTeamResults
Returns an array-like TournamentTeamResults collection with results for a given team in the current tournament.
Methods inherited from Base
attribute_mapping, #eager_load!, inherited, #initialize, no_eager_loading!, no_lazy_support!, #to_h
Methods included from Request
Methods included from Connection
Methods inherited from ChgkObject
#build_model, #extract_id_from
Constructor Details
This class inherits a constructor from ChgkRating::Models::Base
Instance Method Details
#team_by(team_or_id) ⇒ ChgkRating::Models::TournamentTeam
Returns information about a single TournamentTeam in the current tournament
37 38 39 |
# File 'lib/chgk_rating/models/tournament/tournament.rb', line 37 def team_by(team_or_id) ChgkRating::Models::TournamentTeam.new team_or_id, tournament: self, lazy: true end |
#team_list ⇒ ChgkRating::Collection::Ratings
Returns an array-like TournamentTeams collection specifying which teams participated in the current tournament
28 29 30 |
# File 'lib/chgk_rating/models/tournament/tournament.rb', line 28 def team_list ChgkRating::Collections::TournamentTeams.new tournament: self end |
#team_players(team_or_id) ⇒ ChgkRating::Collection::TournamentTeamPlayers
Returns an array-like TournamentTeamPlayers collection containing roster for a team at the current tournament.
11 12 13 |
# File 'lib/chgk_rating/models/tournament/tournament.rb', line 11 def team_players(team_or_id) ChgkRating::Collections::TournamentTeamPlayers.new tournament: self, team: team_or_id end |
#team_results(team_or_id) ⇒ ChgkRating::Collection::TournamentTeamResults
Returns an array-like TournamentTeamResults collection with results for a given team in the current tournament
21 22 23 |
# File 'lib/chgk_rating/models/tournament/tournament.rb', line 21 def team_results(team_or_id) ChgkRating::Collections::TournamentTeamResults.new tournament: self, team: team_or_id end |