Class: Contact

Inherits:
Object
  • Object
show all
Defined in:
lib/telegramObjects.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Contact

Returns a new instance of Contact.



145
146
147
148
149
150
151
# File 'lib/telegramObjects.rb', line 145

def initialize json
  return if !json
  @phone_number = json["phone_number"]
  @first_name = json["first_name"]
  @last_name = json["last_name"]
  @user_id = json["user_id"]
end

Instance Attribute Details

#first_nameObject

Returns the value of attribute first_name.



144
145
146
# File 'lib/telegramObjects.rb', line 144

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



144
145
146
# File 'lib/telegramObjects.rb', line 144

def last_name
  @last_name
end

#phone_numberObject

Returns the value of attribute phone_number.



144
145
146
# File 'lib/telegramObjects.rb', line 144

def phone_number
  @phone_number
end

#user_idObject

Returns the value of attribute user_id.



144
145
146
# File 'lib/telegramObjects.rb', line 144

def user_id
  @user_id
end