Class: Xrc::User
- Inherits:
-
Object
- Object
- Xrc::User
- Defined in:
- lib/xrc/user.rb
Instance Method Summary collapse
-
#initialize(attributes) ⇒ User
constructor
A new instance of User.
-
#jid ⇒ Xrc::Jid
JID represented in a Xrc::Jid object.
-
#mention_name ⇒ String
Mention name.
-
#name ⇒ String
Full name.
Constructor Details
#initialize(attributes) ⇒ User
Returns a new instance of User.
8 9 10 |
# File 'lib/xrc/user.rb', line 8 def initialize(attributes) @attributes = attributes end |
Instance Method Details
#jid ⇒ Xrc::Jid
Returns JID represented in a Xrc::Jid object.
13 14 15 |
# File 'lib/xrc/user.rb', line 13 def jid @jid ||= Jid.new(@attributes[:jid]) end |
#mention_name ⇒ String
Returns Mention name.
18 19 20 |
# File 'lib/xrc/user.rb', line 18 def mention_name @attributes[:mention_name] end |
#name ⇒ String
Returns Full name.
23 24 25 |
# File 'lib/xrc/user.rb', line 23 def name @attributes[:name] end |