Class: LeagueOfLegends::DTO::MatchHistorySummary

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ MatchHistorySummary

Returns a new instance of MatchHistorySummary.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 12

def initialize attributes
  return if attributes.nil?

  @assists = attributes[:assists]
  @date = Time.at(attributes[:date]/1000)
  @deaths = attributes[:deaths]
  @game_id = attributes[:gameId]
  @game_mode = attributes[:gameMode]
  @invalid = attributes[:invalid]
  @kills = attributes[:kills]
  @map_id = attributes[:mapId]
  @opposing_team_kills = attributes[:opposingTeamKills]
  @opposing_team_name = attributes[:opposingTeamName]
  @win = attributes[:win]
end

Instance Attribute Details

#assistsObject (readonly)

Returns the value of attribute assists.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def assists
  @assists
end

#dateObject (readonly)

Returns the value of attribute date.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def date
  @date
end

#deathsObject (readonly)

Returns the value of attribute deaths.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def deaths
  @deaths
end

#game_idObject (readonly)

Returns the value of attribute game_id.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def game_id
  @game_id
end

#game_modeObject (readonly)

Returns the value of attribute game_mode.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def game_mode
  @game_mode
end

#invalidObject (readonly)

Returns the value of attribute invalid.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def invalid
  @invalid
end

#killsObject (readonly)

Returns the value of attribute kills.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def kills
  @kills
end

#map_idObject (readonly)

Returns the value of attribute map_id.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def map_id
  @map_id
end

#opposing_team_killsObject (readonly)

Returns the value of attribute opposing_team_kills.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def opposing_team_kills
  @opposing_team_kills
end

#opposing_team_nameObject (readonly)

Returns the value of attribute opposing_team_name.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def opposing_team_name
  @opposing_team_name
end

#winObject (readonly)

Returns the value of attribute win.



9
10
11
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 9

def win
  @win
end

Class Method Details

.versionObject



5
6
7
# File 'lib/league_of_legends/dto/match_history_summary.rb', line 5

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