Class: Wowr::Classes::FullGuild
Overview
<guildInfo>
<guild>
<members filterField="" filterValue="" maxPage="1" memberCount="1" page="1" sortDir="a" sortField="">
<character class="Paladin" classId="2" gender="Male" genderId="0" level="14" name="Sturky" race="Dwarf" raceId="3" rank="0" url="r=Stormrage&n=Sturky"/>
</members>
</guild>
</guildInfo>
Instance Attribute Summary collapse
-
#members ⇒ Object
readonly
, :member_count.
-
#name_url ⇒ Object
readonly
, :member_count.
-
#realm_url ⇒ Object
readonly
, :member_count.
Attributes inherited from Guild
Instance Method Summary collapse
-
#initialize(elem) ⇒ FullGuild
constructor
A new instance of FullGuild.
Constructor Details
#initialize(elem) ⇒ FullGuild
Returns a new instance of FullGuild.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/wowr/guild.rb', line 66 def initialize(elem) super(elem) @name_url = elem[:nameUrl] @realm_url = elem[:realmUrl] # Guild/guild_id/guild_url not set for characters if (elem%'guildInfo') # @member_count = (elem%'guildInfo'%'guild'%'members')[:memberCount].to_i || nil @members = {} (elem%'guildInfo'%'guild'%'members'/:character).each do |char| # TODO: Change to search character? members[char[:name]] = Character.new(char) end end end |
Instance Attribute Details
#members ⇒ Object (readonly)
, :member_count
64 65 66 |
# File 'lib/wowr/guild.rb', line 64 def members @members end |
#name_url ⇒ Object (readonly)
, :member_count
64 65 66 |
# File 'lib/wowr/guild.rb', line 64 def name_url @name_url end |
#realm_url ⇒ Object (readonly)
, :member_count
64 65 66 |
# File 'lib/wowr/guild.rb', line 64 def realm_url @realm_url end |