Class: LeagueOfLegends::DTO::Team
- Defined in:
- lib/league_of_legends/dto/team.rb
Instance Attribute Summary collapse
-
#create_date ⇒ Object
readonly
Returns the value of attribute create_date.
-
#full_id ⇒ Object
readonly
Returns the value of attribute full_id.
-
#last_game_date ⇒ Object
readonly
Returns the value of attribute last_game_date.
-
#last_join_date ⇒ Object
readonly
Returns the value of attribute last_join_date.
-
#last_joined_ranked_team_queue_date ⇒ Object
readonly
Returns the value of attribute last_joined_ranked_team_queue_date.
-
#match_history ⇒ Object
readonly
Returns the value of attribute match_history.
-
#message_of_day ⇒ Object
readonly
Returns the value of attribute message_of_day.
-
#modify_date ⇒ Object
readonly
Returns the value of attribute modify_date.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#roster ⇒ Object
readonly
Returns the value of attribute roster.
-
#second_last_join_date ⇒ Object
readonly
Returns the value of attribute second_last_join_date.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
-
#team_stat_summary ⇒ Object
readonly
Returns the value of attribute team_stat_summary.
-
#third_last_join_date ⇒ Object
readonly
Returns the value of attribute third_last_join_date.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Team
constructor
A new instance of Team.
Constructor Details
#initialize(attributes) ⇒ Team
Returns a new instance of Team.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/league_of_legends/dto/team.rb', line 11 def initialize attributes return if attributes.nil? @create_date = Time.at(attributes[:createDate]/1000) @full_id = attributes[:fullId] @last_game_date = Time.at(attributes[:lastGameDate]/1000) @last_join_date = Time.at(attributes[:lastJoinDate]/1000) @last_joined_ranked_team_queue_date = Time.at(attributes[:lastJoinedRankedTeamQueueDate]/1000) @match_history = attributes[:matchHistory].map do |match| ::LeagueOfLegends::DTO::MatchHistorySummary.new(match) end @message_of_day = ::LeagueOfLegends::DTO::MessageOfDay.new(attributes[:messageOfDay]) @modify_date = Time.at(attributes[:modifyDate]/1000) @name = attributes[:name] @roster = ::LeagueOfLegends::DTO::Roster.new(attributes[:roster]) @second_last_join_date = Time.at(attributes[:secondLastJoinDate]/1000) @status = attributes[:status] @tag = attributes[:tag] @team_stat_summary = ::LeagueOfLegends::DTO::TeamStatSummary.new(attributes[:teamStatSummary]) @third_last_join_date = Time.at(attributes[:thirdLastJoinDate]/1000) end |
Instance Attribute Details
#create_date ⇒ Object (readonly)
Returns the value of attribute create_date.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def create_date @create_date end |
#full_id ⇒ Object (readonly)
Returns the value of attribute full_id.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def full_id @full_id end |
#last_game_date ⇒ Object (readonly)
Returns the value of attribute last_game_date.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def last_game_date @last_game_date end |
#last_join_date ⇒ Object (readonly)
Returns the value of attribute last_join_date.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def last_join_date @last_join_date end |
#last_joined_ranked_team_queue_date ⇒ Object (readonly)
Returns the value of attribute last_joined_ranked_team_queue_date.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def last_joined_ranked_team_queue_date @last_joined_ranked_team_queue_date end |
#match_history ⇒ Object (readonly)
Returns the value of attribute match_history.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def match_history @match_history end |
#message_of_day ⇒ Object (readonly)
Returns the value of attribute message_of_day.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def @message_of_day end |
#modify_date ⇒ Object (readonly)
Returns the value of attribute modify_date.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def modify_date @modify_date end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def name @name end |
#roster ⇒ Object (readonly)
Returns the value of attribute roster.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def roster @roster end |
#second_last_join_date ⇒ Object (readonly)
Returns the value of attribute second_last_join_date.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def second_last_join_date @second_last_join_date end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def status @status end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def tag @tag end |
#team_stat_summary ⇒ Object (readonly)
Returns the value of attribute team_stat_summary.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def team_stat_summary @team_stat_summary end |
#third_last_join_date ⇒ Object (readonly)
Returns the value of attribute third_last_join_date.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def third_last_join_date @third_last_join_date end |
#x ⇒ Object (readonly)
Returns the value of attribute x.
9 10 11 |
# File 'lib/league_of_legends/dto/team.rb', line 9 def x @x end |
Class Method Details
.version ⇒ Object
5 6 7 |
# File 'lib/league_of_legends/dto/team.rb', line 5 def self.version 'v2.2' end |