Class: Wowr::Classes::Guild
- Inherits:
-
Object
- Object
- Wowr::Classes::Guild
- Defined in:
- lib/wowr/guild.rb
Overview
A player guild containing members Abstract
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute name.
-
#realm ⇒ Object
readonly
Returns the value of attribute realm.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(elem) ⇒ Guild
constructor
A new instance of Guild.
Constructor Details
#initialize(elem) ⇒ Guild
Returns a new instance of Guild.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/wowr/guild.rb', line 16 def initialize(elem) if (elem%'guildKey') guild = (elem%'guildKey') else guild = elem end @name = guild[:name] @url = guild[:url] @realm = guild[:realm] end |
Instance Attribute Details
#name ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute name.
12 13 14 |
# File 'lib/wowr/guild.rb', line 12 def name @name end |
#realm ⇒ Object (readonly)
Returns the value of attribute realm.
12 13 14 |
# File 'lib/wowr/guild.rb', line 12 def realm @realm end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
12 13 14 |
# File 'lib/wowr/guild.rb', line 12 def url @url end |