Class: Telegram::Bot::Types::Contact

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Contact

Returns a new instance of Contact.



8
9
10
# File 'lib/telegram/bot/types/contact.rb', line 8

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/contact.rb', line 3

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



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

def last_name
  @last_name
end

#phone_numberObject

Returns the value of attribute phone_number.



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

def phone_number
  @phone_number
end

#user_idObject

Returns the value of attribute user_id.



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

def user_id
  @user_id
end