Class: Lara::Models::GlossaryShares

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

parse_time

Constructor Details

#initialize(glossary:, account: nil, groups: [], users: [], **_kwargs) ⇒ GlossaryShares

Returns a new instance of GlossaryShares.



35
36
37
38
39
40
41
# File 'lib/lara/models/shares.rb', line 35

def initialize(glossary:, account: nil, groups: [], users: [], **_kwargs)
  super()
  @glossary = Glossary.new(**glossary.transform_keys(&:to_sym))
  @account = ResourceShareEntry.new(**.transform_keys(&:to_sym)) if 
  @groups = groups.map { |entry| ResourceShareEntry.new(**entry.transform_keys(&:to_sym)) }
  @users = users.map { |entry| ResourceShareEntry.new(**entry.transform_keys(&:to_sym)) }
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.



33
34
35
# File 'lib/lara/models/shares.rb', line 33

def 
  @account
end

#glossaryObject (readonly)

Returns the value of attribute glossary.



33
34
35
# File 'lib/lara/models/shares.rb', line 33

def glossary
  @glossary
end

#groupsObject (readonly)

Returns the value of attribute groups.



33
34
35
# File 'lib/lara/models/shares.rb', line 33

def groups
  @groups
end

#usersObject (readonly)

Returns the value of attribute users.



33
34
35
# File 'lib/lara/models/shares.rb', line 33

def users
  @users
end