Class: Wowr::Classes::SearchGuild

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

Overview

Basic search information returned by the search.xml <guilds>

<guild

battleGroup=“Ruin” faction=“Alliance” factionId=“0” name=“HAND” realm=“Stormrage” relevance=“100” url=“r=Stormrage&amp;n=HAND&amp;p=1”/> </guilds>

Instance Attribute Summary collapse

Attributes inherited from Guild

#name, #realm, #url

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ SearchGuild

Returns a new instance of SearchGuild.



43
44
45
46
47
48
49
50
51
# File 'lib/wowr/guild.rb', line 43

def initialize(elem)
	super(elem)
	
	@battle_group = elem[:battleGroup]
	@faction			= elem[:faction]
	@faction_id		= elem[:factionId].to_i
	
	@relevance		= elem[:relevance].to_i
end

Instance Attribute Details

#battle_groupObject (readonly)

Returns the value of attribute battle_group.



41
42
43
# File 'lib/wowr/guild.rb', line 41

def battle_group
  @battle_group
end

#factionObject (readonly)

Returns the value of attribute faction.



41
42
43
# File 'lib/wowr/guild.rb', line 41

def faction
  @faction
end

#faction_idObject (readonly)

Returns the value of attribute faction_id.



41
42
43
# File 'lib/wowr/guild.rb', line 41

def faction_id
  @faction_id
end