Class: Telegram::Bot::Types::Contact
- Inherits:
-
Object
- Object
- Telegram::Bot::Types::Contact
- Defined in:
- lib/telegram/bot/types/contact.rb
Instance Attribute Summary collapse
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Contact
constructor
A new instance of Contact.
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_name ⇒ Object
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_name ⇒ Object
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_number ⇒ Object
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_id ⇒ Object
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 |