Class: LeagueOfLegends::DTO::PlayerStatsSummaryList

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_summariesObject (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_idObject (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

.versionObject



8
9
10
# File 'lib/league_of_legends/dto/player_stats_summary_list.rb', line 8

def self.version
  'v1.2'
end