Class: Threesixtyvoice::GroupMembers
- Inherits:
-
Object
- Object
- Threesixtyvoice::GroupMembers
- Defined in:
- lib/threesixtyvoice/group_members.rb
Instance Attribute Summary collapse
-
#groupid ⇒ Object
readonly
Returns the value of attribute groupid.
-
#grouplink ⇒ Object
readonly
Returns the value of attribute grouplink.
-
#groupname ⇒ Object
readonly
Returns the value of attribute groupname.
-
#members ⇒ Object
readonly
Returns the value of attribute members.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(doc) ⇒ GroupMembers
constructor
A new instance of GroupMembers.
Constructor Details
#initialize(doc) ⇒ GroupMembers
Returns a new instance of GroupMembers.
5 6 7 8 9 10 11 12 13 |
# File 'lib/threesixtyvoice/group_members.rb', line 5 def initialize(doc) @version = doc.xpath('//api/groupinfo/version').text @groupid = doc.xpath('//api/groupinfo/groupid').text @groupname = doc.xpath('//api/groupinfo/groupname').text @grouplink = doc.xpath('//api/groupinfo/grouplink').text @members = doc.xpath('//api/groupmembers/member').map do |i| GroupMember.new(i.xpath('gamertag').text, i.xpath('joindate').text, i.xpath('role').text) end end |
Instance Attribute Details
#groupid ⇒ Object (readonly)
Returns the value of attribute groupid.
3 4 5 |
# File 'lib/threesixtyvoice/group_members.rb', line 3 def groupid @groupid end |
#grouplink ⇒ Object (readonly)
Returns the value of attribute grouplink.
3 4 5 |
# File 'lib/threesixtyvoice/group_members.rb', line 3 def grouplink @grouplink end |
#groupname ⇒ Object (readonly)
Returns the value of attribute groupname.
3 4 5 |
# File 'lib/threesixtyvoice/group_members.rb', line 3 def groupname @groupname end |
#members ⇒ Object (readonly)
Returns the value of attribute members.
3 4 5 |
# File 'lib/threesixtyvoice/group_members.rb', line 3 def members @members end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
3 4 5 |
# File 'lib/threesixtyvoice/group_members.rb', line 3 def version @version end |