Class: User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json_hash) ⇒ User

Returns a new instance of User.



5
6
7
8
9
# File 'lib/papercall/models/user.rb', line 5

def initialize(json_hash)
  @name = json_hash[:name]
  @avatar = json_hash[:avatar]
  @email = json_hash[:email]
end

Instance Attribute Details

#avatarObject (readonly)

Returns the value of attribute avatar.



3
4
5
# File 'lib/papercall/models/user.rb', line 3

def avatar
  @avatar
end

#emailObject (readonly)

Returns the value of attribute email.



3
4
5
# File 'lib/papercall/models/user.rb', line 3

def email
  @email
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/papercall/models/user.rb', line 3

def name
  @name
end