class MasterLeague::TeamRepository

Private Instance Methods

instantiate_record(team_json) click to toggle source
# File lib/master_league/team_repository.rb, line 11
def instantiate_record(team_json)
  team_json[:region_id] = team_json.delete('region')
  Team.new(team_json)
end
instantiate_records(teams_json) click to toggle source
# File lib/master_league/team_repository.rb, line 7
def instantiate_records(teams_json)
  teams_json['results'].map { |team_json| instantiate_record(team_json) }
end