Class: Sightstone::LeagueItem
- Inherits:
-
Object
- Object
- Sightstone::LeagueItem
- Defined in:
- lib/sightstone/league.rb
Overview
One entry of a league
Instance Attribute Summary collapse
-
#isFreshBlood ⇒ Boolean
determines if summoner is new in the league.
-
#isHotStreak ⇒ Boolean
hotStreak = 3 games won in a row.
-
#isInactive ⇒ Boolean
true if summoner is inactive.
-
#isVeteran ⇒ Object
Returns the value of attribute isVeteran.
-
#isVetern ⇒ Boolean
true if veteran.
-
#lastPlayed ⇒ Fixnum
timestamp of last played game.
-
#leagueName ⇒ String
name of the league.
-
#leaguePoints ⇒ Fixnum
leaguePoints.
-
#miniSeries ⇒ Object
Returns the value of attribute miniSeries.
-
#nil ⇒ MiniSeries?
if player has no miniseries, a miniseries object if he is in one.
-
#playerOrTeamId ⇒ String
id of the player or team as a string.
-
#playerOrTeamName ⇒ String
name of the player/team.
-
#queueType ⇒ String
type of the queue.
-
#rank ⇒ String
rank (can be: I, II, III, IV, V).
-
#tier ⇒ String
tier (can be: CHALLENGER, DIAMOND, PLATINUM, GOLD, SILVER, BRONZE).
-
#wins ⇒ Fixnum
number of won matches in given queue.
Instance Method Summary collapse
-
#initialize(data) ⇒ LeagueItem
constructor
A new instance of LeagueItem.
Constructor Details
#initialize(data) ⇒ LeagueItem
Returns a new instance of LeagueItem.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/sightstone/league.rb', line 40 def initialize(data) @isFreshBlood=data['isFreshBlood'] @isHotStreak=data['isHotStreak'] @isInactive=data['isInactive'] @isVeteran=data['isVeteran'] @lastPlayed=data['lastPlayed'] @leagueName=data['leagueName'] @leaguePoints=data['leaguePoints'] @miniSeries= MiniSeries.new(data['miniSeries']) if data.has_key? 'miniSeries' @playerOrTeamId=data['playerOrTeamId'] @playerOrTeamName=data['playerOrTeamName'] @queueType=data['queueType'] @rank=data['rank'] @tier=data['tier'] @wins=data['wins'] end |
Instance Attribute Details
#isFreshBlood ⇒ Boolean
determines if summoner is new in the league
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def isFreshBlood @isFreshBlood end |
#isHotStreak ⇒ Boolean
hotStreak = 3 games won in a row
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def isHotStreak @isHotStreak end |
#isInactive ⇒ Boolean
true if summoner is inactive
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def isInactive @isInactive end |
#isVeteran ⇒ Object
Returns the value of attribute isVeteran.
38 39 40 |
# File 'lib/sightstone/league.rb', line 38 def isVeteran @isVeteran end |
#isVetern ⇒ Boolean
true if veteran
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def isVetern @isVetern end |
#lastPlayed ⇒ Fixnum
timestamp of last played game
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def lastPlayed @lastPlayed end |
#leagueName ⇒ String
name of the league
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def leagueName @leagueName end |
#leaguePoints ⇒ Fixnum
leaguePoints
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def leaguePoints @leaguePoints end |
#miniSeries ⇒ Object
Returns the value of attribute miniSeries.
38 39 40 |
# File 'lib/sightstone/league.rb', line 38 def miniSeries @miniSeries end |
#nil ⇒ MiniSeries?
if player has no miniseries, a miniseries object if he is in one
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def nil @nil end |
#playerOrTeamId ⇒ String
id of the player or team as a string
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def playerOrTeamId @playerOrTeamId end |
#playerOrTeamName ⇒ String
name of the player/team
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def playerOrTeamName @playerOrTeamName end |
#queueType ⇒ String
type of the queue
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def queueType @queueType end |
#rank ⇒ String
rank (can be: I, II, III, IV, V)
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def rank @rank end |
#tier ⇒ String
tier (can be: CHALLENGER, DIAMOND, PLATINUM, GOLD, SILVER, BRONZE)
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def tier @tier end |
#wins ⇒ Fixnum
number of won matches in given queue
37 38 39 |
# File 'lib/sightstone/league.rb', line 37 def wins @wins end |