Class: LeagueOfLegends::DTO::TeamMap

Inherits:
Base
  • Object
show all
Defined in:
lib/league_of_legends/dto/team_map.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ TeamMap

Returns a new instance of TeamMap.



13
14
15
16
17
18
19
# File 'lib/league_of_legends/dto/team_map.rb', line 13

def initialize json
  attributes = build_attributes json

  @teams = attributes.each_with_object({}) do |(team_id, team_dto), map|
    map[team_id.to_s] = ::LeagueOfLegends::DTO::Team.new(team_dto)
  end
end

Instance Attribute Details

#teamsObject (readonly)

Returns the value of attribute teams.



11
12
13
# File 'lib/league_of_legends/dto/team_map.rb', line 11

def teams
  @teams
end

Class Method Details

.versionObject



7
8
9
# File 'lib/league_of_legends/dto/team_map.rb', line 7

def self.version
  ::LeagueOfLegends::DTO::Team.version
end