Class: Leader
- Inherits:
-
Object
- Object
- Leader
- Defined in:
- lib/api/utils/leader.rb
Overview
Leader class
Instance Attribute Summary collapse
-
#comptetitive_tier ⇒ Object
Returns the value of attribute comptetitive_tier.
-
#game_name ⇒ Object
Returns the value of attribute game_name.
-
#is_anonymized ⇒ Object
Returns the value of attribute is_anonymized.
-
#is_banned ⇒ Object
Returns the value of attribute is_banned.
-
#leader_board_rank ⇒ Object
Returns the value of attribute leader_board_rank.
-
#number_of_wins ⇒ Object
Returns the value of attribute number_of_wins.
-
#player_card_id ⇒ Object
Returns the value of attribute player_card_id.
-
#puuid ⇒ Object
Returns the value of attribute puuid.
-
#ranked_rating ⇒ Object
Returns the value of attribute ranked_rating.
-
#tag_line ⇒ Object
Returns the value of attribute tag_line.
-
#title_id ⇒ Object
Returns the value of attribute title_id.
Instance Method Summary collapse
- #fetch_player_data(data) ⇒ Object
-
#initialize(data) ⇒ Leader
constructor
A new instance of Leader.
Constructor Details
#initialize(data) ⇒ Leader
Returns a new instance of Leader.
8 9 10 11 12 13 14 |
# File 'lib/api/utils/leader.rb', line 8 def initialize(data) @leader_board_rank = data['leaderboardRank'] @ranked_rating = data['rankedRating'] @number_of_wins = data['numberOfWins'] @comptetitive_tier = data['competitiveTier'] fetch_player_data(data) end |
Instance Attribute Details
#comptetitive_tier ⇒ Object
Returns the value of attribute comptetitive_tier.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def comptetitive_tier @comptetitive_tier end |
#game_name ⇒ Object
Returns the value of attribute game_name.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def game_name @game_name end |
#is_anonymized ⇒ Object
Returns the value of attribute is_anonymized.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def is_anonymized @is_anonymized end |
#is_banned ⇒ Object
Returns the value of attribute is_banned.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def is_banned @is_banned end |
#leader_board_rank ⇒ Object
Returns the value of attribute leader_board_rank.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def leader_board_rank @leader_board_rank end |
#number_of_wins ⇒ Object
Returns the value of attribute number_of_wins.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def number_of_wins @number_of_wins end |
#player_card_id ⇒ Object
Returns the value of attribute player_card_id.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def player_card_id @player_card_id end |
#puuid ⇒ Object
Returns the value of attribute puuid.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def puuid @puuid end |
#ranked_rating ⇒ Object
Returns the value of attribute ranked_rating.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def @ranked_rating end |
#tag_line ⇒ Object
Returns the value of attribute tag_line.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def tag_line @tag_line end |
#title_id ⇒ Object
Returns the value of attribute title_id.
5 6 7 |
# File 'lib/api/utils/leader.rb', line 5 def title_id @title_id end |
Instance Method Details
#fetch_player_data(data) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/api/utils/leader.rb', line 16 def fetch_player_data(data) @puuid = data['puuid'] @game_name = data['gameName'] @tag_line = data['tagLine'] @player_card_id = data['PlayerCardID'] @title_id = data['TitleID'] @is_banned = data['IsBanned'] @is_anonymized = data['IsAnonymized'] end |