class MasterLeague::TournamentRepository
Public Instance Methods
order(order)
click to toggle source
# File lib/master_league/tournament_repository.rb, line 5 def order(order) raise 'The Tournaments endpoint does not allow ordering' end
Private Instance Methods
instantiate_record(tournament_json)
click to toggle source
# File lib/master_league/tournament_repository.rb, line 15 def instantiate_record(tournament_json) tournament_json[:region_id] = tournament_json.delete('region') Tournament.new(tournament_json) end
instantiate_records(tournaments_json)
click to toggle source
# File lib/master_league/tournament_repository.rb, line 11 def instantiate_records(tournaments_json) tournaments_json['results'].map { |tournament_json| instantiate_record(tournament_json) } end