Class: Telegram::Bot::Types::User
- Inherits:
-
Object
- Object
- Telegram::Bot::Types::User
- Defined in:
- lib/telegram/bot/types/user.rb
Instance Attribute Summary collapse
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_bot ⇒ Object
Returns the value of attribute is_bot.
-
#language_code ⇒ Object
Returns the value of attribute language_code.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(attributes) ⇒ User
Returns a new instance of User.
10 11 12 |
# File 'lib/telegram/bot/types/user.rb', line 10 def initialize(attributes) attributes.each { |k, v| self.send("#{k}=", v) if self.respond_to? k } end |
Instance Attribute Details
#first_name ⇒ Object
Returns the value of attribute first_name.
3 4 5 |
# File 'lib/telegram/bot/types/user.rb', line 3 def first_name @first_name end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/telegram/bot/types/user.rb', line 3 def id @id end |
#is_bot ⇒ Object
Returns the value of attribute is_bot.
3 4 5 |
# File 'lib/telegram/bot/types/user.rb', line 3 def is_bot @is_bot end |
#language_code ⇒ Object
Returns the value of attribute language_code.
3 4 5 |
# File 'lib/telegram/bot/types/user.rb', line 3 def language_code @language_code end |
#last_name ⇒ Object
Returns the value of attribute last_name.
3 4 5 |
# File 'lib/telegram/bot/types/user.rb', line 3 def last_name @last_name end |
#username ⇒ Object
Returns the value of attribute username.
3 4 5 |
# File 'lib/telegram/bot/types/user.rb', line 3 def username @username end |