Class: Sightstone::LeagueItem

Inherits:
Object
  • Object
show all
Defined in:
lib/sightstone/league.rb

Overview

One entry of a league

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#isFreshBloodBoolean

determines if summoner is new in the league

Returns:

  • (Boolean)

    the current value of isFreshBlood



37
38
39
# File 'lib/sightstone/league.rb', line 37

def isFreshBlood
  @isFreshBlood
end

#isHotStreakBoolean

hotStreak = 3 games won in a row

Returns:

  • (Boolean)

    the current value of isHotStreak



37
38
39
# File 'lib/sightstone/league.rb', line 37

def isHotStreak
  @isHotStreak
end

#isInactiveBoolean

true if summoner is inactive

Returns:

  • (Boolean)

    the current value of isInactive



37
38
39
# File 'lib/sightstone/league.rb', line 37

def isInactive
  @isInactive
end

#isVeteranObject

Returns the value of attribute isVeteran.



38
39
40
# File 'lib/sightstone/league.rb', line 38

def isVeteran
  @isVeteran
end

#isVeternBoolean

true if veteran

Returns:

  • (Boolean)

    the current value of isVetern



37
38
39
# File 'lib/sightstone/league.rb', line 37

def isVetern
  @isVetern
end

#lastPlayedFixnum

timestamp of last played game

Returns:

  • (Fixnum)

    the current value of lastPlayed



37
38
39
# File 'lib/sightstone/league.rb', line 37

def lastPlayed
  @lastPlayed
end

#leagueNameString

name of the league

Returns:

  • (String)

    the current value of leagueName



37
38
39
# File 'lib/sightstone/league.rb', line 37

def leagueName
  @leagueName
end

#leaguePointsFixnum

leaguePoints

Returns:

  • (Fixnum)

    the current value of leaguePoints



37
38
39
# File 'lib/sightstone/league.rb', line 37

def leaguePoints
  @leaguePoints
end

#miniSeriesObject

Returns the value of attribute miniSeries.



38
39
40
# File 'lib/sightstone/league.rb', line 38

def miniSeries
  @miniSeries
end

#nilMiniSeries?

if player has no miniseries, a miniseries object if he is in one

Returns:



37
38
39
# File 'lib/sightstone/league.rb', line 37

def nil
  @nil
end

#playerOrTeamIdString

id of the player or team as a string

Returns:

  • (String)

    the current value of playerOrTeamId



37
38
39
# File 'lib/sightstone/league.rb', line 37

def playerOrTeamId
  @playerOrTeamId
end

#playerOrTeamNameString

name of the player/team

Returns:

  • (String)

    the current value of playerOrTeamName



37
38
39
# File 'lib/sightstone/league.rb', line 37

def playerOrTeamName
  @playerOrTeamName
end

#queueTypeString

type of the queue

Returns:

  • (String)

    the current value of queueType



37
38
39
# File 'lib/sightstone/league.rb', line 37

def queueType
  @queueType
end

#rankString

rank (can be: I, II, III, IV, V)

Returns:

  • (String)

    the current value of rank



37
38
39
# File 'lib/sightstone/league.rb', line 37

def rank
  @rank
end

#tierString

tier (can be: CHALLENGER, DIAMOND, PLATINUM, GOLD, SILVER, BRONZE)

Returns:

  • (String)

    the current value of tier



37
38
39
# File 'lib/sightstone/league.rb', line 37

def tier
  @tier
end

#winsFixnum

number of won matches in given queue

Returns:

  • (Fixnum)

    the current value of wins



37
38
39
# File 'lib/sightstone/league.rb', line 37

def wins
  @wins
end