Class: Evntaly::User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, email:, full_name:, organization:, data:) ⇒ User

Returns a new instance of User.



5
6
7
8
9
10
11
# File 'lib/evntaly/user.rb', line 5

def initialize(id:, email:, full_name:, organization:, data:)
  @id = id
  @email = email
  @full_name = full_name
  @organization = organization
  @data = data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



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

def data
  @data
end

#emailObject

Returns the value of attribute email.



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

def email
  @email
end

#full_nameObject

Returns the value of attribute full_name.



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

def full_name
  @full_name
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#organizationObject

Returns the value of attribute organization.



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

def organization
  @organization
end

Instance Method Details

#to_json(*_args) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/evntaly/user.rb', line 13

def to_json(*_args)
  {
    id: @id,
    email: @email,
    full_name: @full_name,
    organization: @organization,
    data: @data
  }.to_json
end