Class: LeagueOfLegends::DTO::PlayerStatsSummary
- Inherits:
-
Object
- Object
- LeagueOfLegends::DTO::PlayerStatsSummary
- Defined in:
- lib/league_of_legends/dto/player_stats_summary.rb
Instance Attribute Summary collapse
-
#aggregated_stats ⇒ Object
readonly
Returns the value of attribute aggregated_stats.
-
#losses ⇒ Object
readonly
Returns the value of attribute losses.
-
#modify_date ⇒ Object
readonly
Returns the value of attribute modify_date.
-
#player_stat_summary_type ⇒ Object
readonly
Returns the value of attribute player_stat_summary_type.
-
#wins ⇒ Object
readonly
Returns the value of attribute wins.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ PlayerStatsSummary
constructor
A new instance of PlayerStatsSummary.
Constructor Details
#initialize(attributes) ⇒ PlayerStatsSummary
Returns a new instance of PlayerStatsSummary.
14 15 16 17 18 19 20 21 22 |
# File 'lib/league_of_legends/dto/player_stats_summary.rb', line 14 def initialize attributes return if attributes.nil? @player_stat_summary_type = attributes[:playerStatSummaryType] @wins = attributes[:wins].to_i @losses = attributes[:losses].to_i @modify_date = Time.at(attributes[:modifyDate]/1000) @aggregated_stats = ::LeagueOfLegends::DTO::AggregatedStats.new(attributes[:aggregatedStats]) end |
Instance Attribute Details
#aggregated_stats ⇒ Object (readonly)
Returns the value of attribute aggregated_stats.
11 12 13 |
# File 'lib/league_of_legends/dto/player_stats_summary.rb', line 11 def aggregated_stats @aggregated_stats end |
#losses ⇒ Object (readonly)
Returns the value of attribute losses.
11 12 13 |
# File 'lib/league_of_legends/dto/player_stats_summary.rb', line 11 def losses @losses end |
#modify_date ⇒ Object (readonly)
Returns the value of attribute modify_date.
11 12 13 |
# File 'lib/league_of_legends/dto/player_stats_summary.rb', line 11 def modify_date @modify_date end |
#player_stat_summary_type ⇒ Object (readonly)
Returns the value of attribute player_stat_summary_type.
11 12 13 |
# File 'lib/league_of_legends/dto/player_stats_summary.rb', line 11 def player_stat_summary_type @player_stat_summary_type end |
#wins ⇒ Object (readonly)
Returns the value of attribute wins.
11 12 13 |
# File 'lib/league_of_legends/dto/player_stats_summary.rb', line 11 def wins @wins end |
Class Method Details
.version ⇒ Object
7 8 9 |
# File 'lib/league_of_legends/dto/player_stats_summary.rb', line 7 def self.version ::LeagueOfLegends::DTO::PlayerStatsSummaryList.version end |