Class: Lara::Models::Memory

Inherits:
Base
  • Object
show all
Defined in:
lib/lara/models/memories.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

parse_time

Constructor Details

#initialize(id:, name:, owner_id:, created_at: nil, updated_at: nil, external_id: nil, secret: nil, collaborators_count: nil, shared_at: nil, is_personal: nil, **_kwargs) ⇒ Memory

Returns a new instance of Memory.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/lara/models/memories.rb', line 11

def initialize(id:, name:, owner_id:, created_at: nil, updated_at: nil,
               external_id: nil, secret: nil, collaborators_count: nil, shared_at: nil,
               is_personal: nil, **_kwargs)
  super()
  @id = id
  @name = name
  @owner_id = owner_id
  @created_at = Base.parse_time(created_at)
  @updated_at = Base.parse_time(updated_at)
  @external_id = external_id
  @secret = secret
  @collaborators_count = collaborators_count
  @shared_at = Base.parse_time(shared_at)
  @is_personal = is_personal.nil? ? _kwargs[:isPersonal] : is_personal
end

Instance Attribute Details

#collaborators_countObject (readonly)

Returns the value of attribute collaborators_count.



8
9
10
# File 'lib/lara/models/memories.rb', line 8

def collaborators_count
  @collaborators_count
end

#created_atObject (readonly)

Returns the value of attribute created_at.



8
9
10
# File 'lib/lara/models/memories.rb', line 8

def created_at
  @created_at
end

#external_idObject (readonly)

Returns the value of attribute external_id.



8
9
10
# File 'lib/lara/models/memories.rb', line 8

def external_id
  @external_id
end

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/lara/models/memories.rb', line 8

def id
  @id
end

#is_personalObject (readonly)

Returns the value of attribute is_personal.



8
9
10
# File 'lib/lara/models/memories.rb', line 8

def is_personal
  @is_personal
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/lara/models/memories.rb', line 8

def name
  @name
end

#owner_idObject (readonly)

Returns the value of attribute owner_id.



8
9
10
# File 'lib/lara/models/memories.rb', line 8

def owner_id
  @owner_id
end

#secretObject (readonly)

Returns the value of attribute secret.



8
9
10
# File 'lib/lara/models/memories.rb', line 8

def secret
  @secret
end

#shared_atObject (readonly)

Returns the value of attribute shared_at.



8
9
10
# File 'lib/lara/models/memories.rb', line 8

def shared_at
  @shared_at
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



8
9
10
# File 'lib/lara/models/memories.rb', line 8

def updated_at
  @updated_at
end