Class: ICQ::User
- Inherits:
-
Object
- Object
- ICQ::User
- Defined in:
- lib/icqbot/user.rb
Instance Attribute Summary collapse
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#photo ⇒ Object
readonly
Returns the value of attribute photo.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(user_h) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(user_h) ⇒ User
Returns a new instance of User.
8 9 10 11 12 13 |
# File 'lib/icqbot/user.rb', line 8 def initialize user_h @first_name = user_h['firstName'] @last_name = user_h['lastName'] @photo = user_h['photo'].first['url'] @type = user_h['type'] end |
Instance Attribute Details
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
6 7 8 |
# File 'lib/icqbot/user.rb', line 6 def first_name @first_name end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
6 7 8 |
# File 'lib/icqbot/user.rb', line 6 def last_name @last_name end |
#photo ⇒ Object (readonly)
Returns the value of attribute photo.
6 7 8 |
# File 'lib/icqbot/user.rb', line 6 def photo @photo end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/icqbot/user.rb', line 6 def type @type end |