Class: Wowr::Classes::ArenaTeam

Inherits:
Object
  • Object
show all
Defined in:
lib/wowr/arena_team.rb

Direct Known Subclasses

FullArenaTeam, SearchArenaTeam

Instance Attribute Summary collapse

Instance Method Summary collapse

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_groupObject (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

#charactersObject (readonly)

Returns the value of attribute characters.



4
5
6
# File 'lib/wowr/arena_team.rb', line 4

def characters
  @characters
end

#emblemObject (readonly)

Returns the value of attribute emblem.



4
5
6
# File 'lib/wowr/arena_team.rb', line 4

def emblem
  @emblem
end

#factionObject (readonly)

Returns the value of attribute faction.



4
5
6
# File 'lib/wowr/arena_team.rb', line 4

def faction
  @faction
end

#faction_idObject (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_playedObject (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_wonObject (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_rankingObject (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

#nameObject (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

#rankingObject (readonly)

Returns the value of attribute ranking.



4
5
6
# File 'lib/wowr/arena_team.rb', line 4

def ranking
  @ranking
end

#ratingObject (readonly)

Returns the value of attribute rating.



4
5
6
# File 'lib/wowr/arena_team.rb', line 4

def rating
  @rating
end

#realmObject (readonly)

Returns the value of attribute realm.



4
5
6
# File 'lib/wowr/arena_team.rb', line 4

def realm
  @realm
end

#realm_urlObject (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

#relevanceObject (readonly)

Returns the value of attribute relevance.



4
5
6
# File 'lib/wowr/arena_team.rb', line 4

def relevance
  @relevance
end

#season_games_playedObject (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_wonObject (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

#sizeObject (readonly)

Returns the value of attribute size.



4
5
6
# File 'lib/wowr/arena_team.rb', line 4

def size
  @size
end

#urlObject (readonly)

Returns the value of attribute url.



4
5
6
# File 'lib/wowr/arena_team.rb', line 4

def url
  @url
end

#url_escapeObject (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