Class: Wowr::Classes::FullCharacter

Inherits:
InfoCharacter show all
Defined in:
lib/wowr/character.rb

Overview

Full character details with reputations

Instance Attribute Summary collapse

Attributes inherited from InfoCharacter

#agility, #arena_teams, #buffs, #char_url, #debuffs, #defenses, #faction, #faction_id, #health, #intellect, #items, #known_titles, #last_modified, #melee, #points, #professions, #pvp, #ranged, #resistances, #second_bar, #spell, #spirit, #stamina, #strength, #talent_spec, #title

Attributes inherited from Character

#battle_group, #contribution, #gender, #gender_id, #guild, #guild_id, #guild_url, #klass, #klass_id, #last_login, #level, #name, #race, #race_id, #rank, #realm, #relevance, #search_rank, #season_games_played, #season_games_won, #team_rank, #url

Instance Method Summary collapse

Methods inherited from InfoCharacter

#character_info, #character_tab

Methods inherited from Character

#class_icon, #icon, #race_icon

Constructor Details

#initialize(sheet, reputation, api = nil) ⇒ FullCharacter

Returns a new instance of FullCharacter.



305
306
307
308
309
310
311
312
313
# File 'lib/wowr/character.rb', line 305

def initialize(sheet, reputation, api = nil)
	@api = api

  # Build the InfoCharacter
  super(sheet, api)
  
  # Add reputations
	character_reputation(reputation)
end

Instance Attribute Details

#reputation_categoriesObject (readonly) Also known as: rep, reputation

Returns the value of attribute reputation_categories.



300
301
302
# File 'lib/wowr/character.rb', line 300

def reputation_categories
  @reputation_categories
end

Instance Method Details

#character_reputation(elem) ⇒ Object

character-reputation.xml



316
317
318
319
320
321
# File 'lib/wowr/character.rb', line 316

def character_reputation(elem)
		@reputation_categories = {}
		(elem/:factionCategory).each do |category|
			@reputation_categories[category[:key]] = RepFactionCategory.new(category)
		end
end