Class: SmartFox::User
- Inherits:
-
Object
- Object
- SmartFox::User
- Defined in:
- lib/smartfox/user.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#moderator ⇒ Object
Returns the value of attribute moderator.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/smartfox/user.rb', line 2 def id @id end |
#moderator ⇒ Object
Returns the value of attribute moderator.
2 3 4 |
# File 'lib/smartfox/user.rb', line 2 def moderator @moderator end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/smartfox/user.rb', line 2 def name @name end |
Class Method Details
.parse(node) ⇒ Object
11 12 13 |
# File 'lib/smartfox/user.rb', line 11 def self.parse(node) new.parse(node) end |
Instance Method Details
#parse(node) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/smartfox/user.rb', line 4 def parse(node) @id = node['i'].to_i @name = node.find_first('n').first.content self end |