Class: LeagueOfLegends::DTO::PlayerStatsSummaryList
- Defined in:
- lib/league_of_legends/dto/player_stats_summary_list.rb
Instance Attribute Summary collapse
-
#player_stat_summaries ⇒ Object
readonly
Returns the value of attribute player_stat_summaries.
-
#summoner_id ⇒ Object
readonly
Returns the value of attribute summoner_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json) ⇒ PlayerStatsSummaryList
constructor
A new instance of PlayerStatsSummaryList.
Constructor Details
#initialize(json) ⇒ PlayerStatsSummaryList
Returns a new instance of PlayerStatsSummaryList.
14 15 16 17 18 19 20 21 |
# File 'lib/league_of_legends/dto/player_stats_summary_list.rb', line 14 def initialize json attributes = build_attributes json @summoner_id = attributes[:summonerId].to_i @player_stat_summaries = attributes[:playerStatSummaries].to_a.map do |pss| ::LeagueOfLegends::DTO::PlayerStatsSummary.new(pss) end end |
Instance Attribute Details
#player_stat_summaries ⇒ Object (readonly)
Returns the value of attribute player_stat_summaries.
12 13 14 |
# File 'lib/league_of_legends/dto/player_stats_summary_list.rb', line 12 def player_stat_summaries @player_stat_summaries end |
#summoner_id ⇒ Object (readonly)
Returns the value of attribute summoner_id.
12 13 14 |
# File 'lib/league_of_legends/dto/player_stats_summary_list.rb', line 12 def summoner_id @summoner_id end |
Class Method Details
.version ⇒ Object
8 9 10 |
# File 'lib/league_of_legends/dto/player_stats_summary_list.rb', line 8 def self.version 'v1.2' end |