Class: Team
- Inherits:
-
Object
- Object
- Team
- Defined in:
- lib/sightstone/team.rb
Instance Attribute Summary (collapse)
-
- (Object) createDate
Returns the value of attribute createDate.
-
- (Object) lastGameDate
Returns the value of attribute lastGameDate.
-
- (Object) lastJoinDate
Returns the value of attribute lastJoinDate.
-
- (Object) lastJoinedRankedTeamQueueDate
Returns the value of attribute lastJoinedRankedTeamQueueDate.
-
- (Object) matchHistory
Returns the value of attribute matchHistory.
-
- (Object) modifyDate
Returns the value of attribute modifyDate.
-
- (Object) name
Returns the value of attribute name.
-
- (Object) roster
Returns the value of attribute roster.
-
- (Object) secondLastJoinDate
Returns the value of attribute secondLastJoinDate.
-
- (Object) status
Returns the value of attribute status.
-
- (Object) tag
Returns the value of attribute tag.
-
- (Object) teamId
Returns the value of attribute teamId.
-
- (Object) teamStatSummary
Returns the value of attribute teamStatSummary.
-
- (Object) thirdLastJoinDate
Returns the value of attribute thirdLastJoinDate.
-
- (Object) timestamp
Returns the value of attribute timestamp.
Instance Method Summary (collapse)
-
- (Team) initialize(data)
constructor
A new instance of Team.
Constructor Details
- (Team) initialize(data)
Returns a new instance of Team
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/sightstone/team.rb', line 3 def initialize(data) @status = data['status'] @tag = data['tag'] @roster = Roster.new(data['roster']) @lastGameDate = data['lastGameDate'] @modifyDate = data['modifyDate'] @teamId = data['teamId']['fullId'] @timestamp = data['timestamp'] @lastJoinDate = data['lastJoinDate'] @secondLastJoinDate = data['secondLastJoinDate'] @matchHistory = [] data['matchHistory'].each do |game| matchHistory << Game.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
- (Object) createDate
Returns the value of attribute createDate
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def createDate @createDate end |
- (Object) lastGameDate
Returns the value of attribute lastGameDate
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def lastGameDate @lastGameDate end |
- (Object) lastJoinDate
Returns the value of attribute lastJoinDate
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def lastJoinDate @lastJoinDate end |
- (Object) lastJoinedRankedTeamQueueDate
Returns the value of attribute lastJoinedRankedTeamQueueDate
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def lastJoinedRankedTeamQueueDate @lastJoinedRankedTeamQueueDate end |
- (Object) matchHistory
Returns the value of attribute matchHistory
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def matchHistory @matchHistory end |
- (Object) modifyDate
Returns the value of attribute modifyDate
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def modifyDate @modifyDate end |
- (Object) name
Returns the value of attribute name
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def name @name end |
- (Object) roster
Returns the value of attribute roster
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def roster @roster end |
- (Object) secondLastJoinDate
Returns the value of attribute secondLastJoinDate
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def secondLastJoinDate @secondLastJoinDate end |
- (Object) status
Returns the value of attribute status
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def status @status end |
- (Object) tag
Returns the value of attribute tag
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def tag @tag end |
- (Object) teamId
Returns the value of attribute teamId
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def teamId @teamId end |
- (Object) teamStatSummary
Returns the value of attribute teamStatSummary
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def teamStatSummary @teamStatSummary end |
- (Object) thirdLastJoinDate
Returns the value of attribute thirdLastJoinDate
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def thirdLastJoinDate @thirdLastJoinDate end |
- (Object) timestamp
Returns the value of attribute timestamp
2 3 4 |
# File 'lib/sightstone/team.rb', line 2 def @timestamp end |