Method: CmisServer::CmisObject#initialize

Defined in:
lib/cmis_server/cmis_object.rb

#initialize(type:, properties: {}, secondary_types: []) ⇒ CmisObject

Returns a new instance of CmisObject.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/cmis_server/cmis_object.rb', line 11

def initialize(type:, properties: {}, secondary_types: [])
  self.type = type
  @secondary_types = []
  initialize_properties
  
  # Ajouter les types secondaires s'ils sont fournis
  secondary_types.each do |secondary_type|
    add_secondary_type(secondary_type)
  end

  properties.to_h.each do |property, value|
    self.send(property.to_s.gsub(/[^0-9a-z]/i, '_').underscore+"=", value)
  end
end