Class: User

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

Overview

Object describing a Bot or User

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ User

Returns a new instance of User.



13
14
15
16
17
18
19
# File 'lib/telegramObjects.rb', line 13

def initialize json
  return if !json
  @id = json["id"]
  @first_name = json["first_name"]
  @last_name = json["last_name"]
  @username = json["username"]
end

Instance Attribute Details

#first_nameObject

Returns the value of attribute first_name.



12
13
14
# File 'lib/telegramObjects.rb', line 12

def first_name
  @first_name
end

#idObject

Returns the value of attribute id.



12
13
14
# File 'lib/telegramObjects.rb', line 12

def id
  @id
end

#last_nameObject

Returns the value of attribute last_name.



12
13
14
# File 'lib/telegramObjects.rb', line 12

def last_name
  @last_name
end

#usernameObject

Returns the value of attribute username.



12
13
14
# File 'lib/telegramObjects.rb', line 12

def username
  @username
end