Class: Wowr::Classes::ArenaTeam
- Inherits:
-
Object
- Object
- Wowr::Classes::ArenaTeam
- Defined in:
- lib/wowr/arena_team.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#battle_group ⇒ Object
readonly
Returns the value of attribute battle_group.
-
#characters ⇒ Object
readonly
Returns the value of attribute characters.
-
#emblem ⇒ Object
readonly
Returns the value of attribute emblem.
-
#faction ⇒ Object
readonly
Returns the value of attribute faction.
-
#faction_id ⇒ Object
readonly
Returns the value of attribute faction_id.
-
#games_played ⇒ Object
readonly
Returns the value of attribute games_played.
-
#games_won ⇒ Object
readonly
Returns the value of attribute games_won.
-
#last_season_ranking ⇒ Object
readonly
Returns the value of attribute last_season_ranking.
-
#name ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute name.
-
#ranking ⇒ Object
readonly
Returns the value of attribute ranking.
-
#rating ⇒ Object
readonly
Returns the value of attribute rating.
-
#realm ⇒ Object
readonly
Returns the value of attribute realm.
-
#realm_url ⇒ Object
readonly
Returns the value of attribute realm_url.
-
#relevance ⇒ Object
readonly
Returns the value of attribute relevance.
-
#season_games_played ⇒ Object
readonly
Returns the value of attribute season_games_played.
-
#season_games_won ⇒ Object
readonly
Returns the value of attribute season_games_won.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#url_escape ⇒ Object
readonly
Returns the value of attribute url_escape.
Instance Method Summary collapse
-
#initialize(elem) ⇒ ArenaTeam
constructor
A new instance of ArenaTeam.
Constructor Details
#initialize(elem) ⇒ ArenaTeam
Returns a new instance of ArenaTeam.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/wowr/arena_team.rb', line 12 def initialize(elem) @name = elem[:name] @size = elem[:size].to_i @battle_group = elem[:battleGroup] @faction = elem[:faction] @faction_id = elem[:factionId].to_i @realm = elem[:realm] @realm_url = elem[:realmUrl] @games_played = elem[:gamesPlayed].to_i @games_won = elem[:gamesWon].to_i # @ranking = elem[:ranking].to_i # Ranking in the seach results is always 0 @rating = elem[:rating].to_i @season_games_played = elem[:seasonGamesPlayed].to_i @season_games_won = elem[:seasonGamesWon].to_i @last_season_ranking = elem[:lastSeasonRanking].to_i @relevance = elem[:relevance].to_i @url = elem[:url] @emblem = ArenaTeamEmblem.new(elem%'emblem') end |
Instance Attribute Details
#battle_group ⇒ Object (readonly)
Returns the value of attribute battle_group.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def battle_group @battle_group end |
#characters ⇒ Object (readonly)
Returns the value of attribute characters.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def characters @characters end |
#emblem ⇒ Object (readonly)
Returns the value of attribute emblem.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def emblem @emblem end |
#faction ⇒ Object (readonly)
Returns the value of attribute faction.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def faction @faction end |
#faction_id ⇒ Object (readonly)
Returns the value of attribute faction_id.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def faction_id @faction_id end |
#games_played ⇒ Object (readonly)
Returns the value of attribute games_played.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def games_played @games_played end |
#games_won ⇒ Object (readonly)
Returns the value of attribute games_won.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def games_won @games_won end |
#last_season_ranking ⇒ Object (readonly)
Returns the value of attribute last_season_ranking.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def last_season_ranking @last_season_ranking end |
#name ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute name.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def name @name end |
#ranking ⇒ Object (readonly)
Returns the value of attribute ranking.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def ranking @ranking end |
#rating ⇒ Object (readonly)
Returns the value of attribute rating.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def @rating end |
#realm ⇒ Object (readonly)
Returns the value of attribute realm.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def realm @realm end |
#realm_url ⇒ Object (readonly)
Returns the value of attribute realm_url.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def realm_url @realm_url end |
#relevance ⇒ Object (readonly)
Returns the value of attribute relevance.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def relevance @relevance end |
#season_games_played ⇒ Object (readonly)
Returns the value of attribute season_games_played.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def season_games_played @season_games_played end |
#season_games_won ⇒ Object (readonly)
Returns the value of attribute season_games_won.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def season_games_won @season_games_won end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def size @size end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def url @url end |
#url_escape ⇒ Object (readonly)
Returns the value of attribute url_escape.
4 5 6 |
# File 'lib/wowr/arena_team.rb', line 4 def url_escape @url_escape end |