Class: VKTeams::User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_h) ⇒ User

Returns a new instance of User.



8
9
10
11
12
13
# File 'lib/vkteamsbot/user.rb', line 8

def initialize user_h
  @first_name = user_h['firstName']
  @last_name = user_h['lastName']
  @photo = user_h['photo'].first['url']
  @type = user_h['type']
end

Instance Attribute Details

#first_nameObject (readonly)

Returns the value of attribute first_name.



6
7
8
# File 'lib/vkteamsbot/user.rb', line 6

def first_name
  @first_name
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



6
7
8
# File 'lib/vkteamsbot/user.rb', line 6

def last_name
  @last_name
end

#photoObject (readonly)

Returns the value of attribute photo.



6
7
8
# File 'lib/vkteamsbot/user.rb', line 6

def photo
  @photo
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/vkteamsbot/user.rb', line 6

def type
  @type
end