Class: SmartFox::User

Inherits:
Object
  • Object
show all
Defined in:
lib/smartfox/user.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject

Returns the value of attribute id.



2
3
4
# File 'lib/smartfox/user.rb', line 2

def id
  @id
end

#moderatorObject

Returns the value of attribute moderator.



2
3
4
# File 'lib/smartfox/user.rb', line 2

def moderator
  @moderator
end

#nameObject

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