Class: LeagueOfLegends::DTO::TeamMap
- Defined in:
- lib/league_of_legends/dto/team_map.rb
Instance Attribute Summary collapse
-
#teams ⇒ Object
readonly
Returns the value of attribute teams.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json) ⇒ TeamMap
constructor
A new instance of TeamMap.
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
#teams ⇒ Object (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
.version ⇒ Object
7 8 9 |
# File 'lib/league_of_legends/dto/team_map.rb', line 7 def self.version ::LeagueOfLegends::DTO::Team.version end |