Class: Sightstone::Team
- Inherits:
-
Object
- Object
- Sightstone::Team
- Defined in:
- lib/sightstone/team.rb
Instance Attribute Summary collapse
-
#createDate ⇒ Object
Returns the value of attribute createDate.
-
#lastGameDate ⇒ Object
Returns the value of attribute lastGameDate.
-
#lastJoinDate ⇒ Object
Returns the value of attribute lastJoinDate.
-
#lastJoinedRankedTeamQueueDate ⇒ Object
Returns the value of attribute lastJoinedRankedTeamQueueDate.
-
#matchHistory ⇒ Object
Returns the value of attribute matchHistory.
-
#modifyDate ⇒ Object
Returns the value of attribute modifyDate.
-
#name ⇒ Object
Returns the value of attribute name.
-
#roster ⇒ Object
Returns the value of attribute roster.
-
#secondLastJoinDate ⇒ Object
Returns the value of attribute secondLastJoinDate.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#teamId ⇒ Object
Returns the value of attribute teamId.
-
#teamStatSummary ⇒ Object
Returns the value of attribute teamStatSummary.
-
#thirdLastJoinDate ⇒ Object
Returns the value of attribute thirdLastJoinDate.
-
#thridLastJoinDate ⇒ Fixnum
UNIX timestamp of third latest join date of a member.
Instance Method Summary collapse
-
#initialize(data) ⇒ Team
constructor
A new instance of Team.
Constructor Details
#initialize(data) ⇒ Team
Returns a new instance of Team.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/sightstone/team.rb', line 19 def initialize(data) @status = data['status'] @tag = data['tag'] @roster = Roster.new(data['roster']) @lastGameDate = data['lastGameDate'] @modifyDate = data['modifyDate'] @teamId = data['fullId'] @lastJoinDate = data['lastJoinDate'] @secondLastJoinDate = data['secondLastJoinDate'] @matchHistory = [] data['matchHistory'].each do |game| matchHistory << TeamHistoryGame.new(game) end @lastJoinedRankedTeamQueueDate=data['lastJoinedRankedTeamQueueDate'] @name = data['name'] @thirdLastJoinDate = data['thirdLastJoinDate'] @createDate = data['createDate'] @teamStatSummary = [] data['teamStatSummary']['teamStatDetails'].each do |detail| teamStatSummary << TeamStat.new(detail) end end |
Instance Attribute Details
#createDate ⇒ Object
Returns the value of attribute createDate.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def createDate @createDate end |
#lastGameDate ⇒ Object
Returns the value of attribute lastGameDate.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def lastGameDate @lastGameDate end |
#lastJoinDate ⇒ Object
Returns the value of attribute lastJoinDate.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def lastJoinDate @lastJoinDate end |
#lastJoinedRankedTeamQueueDate ⇒ Object
Returns the value of attribute lastJoinedRankedTeamQueueDate.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def lastJoinedRankedTeamQueueDate @lastJoinedRankedTeamQueueDate end |
#matchHistory ⇒ Object
Returns the value of attribute matchHistory.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def matchHistory @matchHistory end |
#modifyDate ⇒ Object
Returns the value of attribute modifyDate.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def modifyDate @modifyDate end |
#name ⇒ Object
Returns the value of attribute name.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def name @name end |
#roster ⇒ Object
Returns the value of attribute roster.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def roster @roster end |
#secondLastJoinDate ⇒ Object
Returns the value of attribute secondLastJoinDate.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def secondLastJoinDate @secondLastJoinDate end |
#status ⇒ Object
Returns the value of attribute status.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def status @status end |
#tag ⇒ Object
Returns the value of attribute tag.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def tag @tag end |
#teamId ⇒ Object
Returns the value of attribute teamId.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def teamId @teamId end |
#teamStatSummary ⇒ Object
Returns the value of attribute teamStatSummary.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def teamStatSummary @teamStatSummary end |
#thirdLastJoinDate ⇒ Object
Returns the value of attribute thirdLastJoinDate.
18 19 20 |
# File 'lib/sightstone/team.rb', line 18 def thirdLastJoinDate @thirdLastJoinDate end |
#thridLastJoinDate ⇒ Fixnum
UNIX timestamp of third latest join date of a member
17 18 19 |
# File 'lib/sightstone/team.rb', line 17 def thridLastJoinDate @thridLastJoinDate end |