Class: User
- Inherits:
-
Object
- Object
- User
- Defined in:
- lib/telegramObjects.rb
Overview
Object describing a Bot or User
Instance Attribute Summary collapse
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(json) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(json) ⇒ User
Returns a new instance of User.
13 14 15 16 17 18 19 |
# File 'lib/telegramObjects.rb', line 13 def initialize json return if !json @id = json["id"] @first_name = json["first_name"] @last_name = json["last_name"] @username = json["username"] end |
Instance Attribute Details
#first_name ⇒ Object
Returns the value of attribute first_name.
12 13 14 |
# File 'lib/telegramObjects.rb', line 12 def first_name @first_name end |
#id ⇒ Object
Returns the value of attribute id.
12 13 14 |
# File 'lib/telegramObjects.rb', line 12 def id @id end |
#last_name ⇒ Object
Returns the value of attribute last_name.
12 13 14 |
# File 'lib/telegramObjects.rb', line 12 def last_name @last_name end |
#username ⇒ Object
Returns the value of attribute username.
12 13 14 |
# File 'lib/telegramObjects.rb', line 12 def username @username end |