Class: Telegram::Bot::Types::User

Inherits:
Object
  • Object
show all
Defined in:
lib/telegram/bot/types/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject

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

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/telegram/bot/types/user.rb', line 3

def id
  @id
end

#is_botObject

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_codeObject

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_nameObject

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

#usernameObject

Returns the value of attribute username.



3
4
5
# File 'lib/telegram/bot/types/user.rb', line 3

def username
  @username
end