Method: CmisServer::Type#initialize

Defined in:
lib/cmis_server/type.rb

#initialize(attrs = {}) ⇒ Type

Returns a new instance of Type.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/cmis_server/type.rb', line 22

def initialize(attrs={})
  @id                          = CmisServer::Id.new(attrs.fetch(:id).to_s)
  @parent_type                 = attrs.fetch(:parent_type)
  @local_name                  = attrs.fetch(:local_name, id)
  @local_namespace             = attrs.fetch(:local_namespace, 'local')
  @query_name                  = attrs.fetch(:query_name, id)
  @display_name                = attrs.fetch(:display_name, id)
  @description                 = attrs.fetch(:description, 'No description provided')
  @creatable                   = attrs.fetch(:creatable, false)
  @fileable                    = attrs.fetch(:fileable, false)
  @queryable                   = attrs.fetch(:queryable, false)
  @controllable_policy         = attrs.fetch(:controllable_policy, false)
  @controllable_acl            = attrs.fetch(:controllable_acl, false)
  @fulltext_indexed            = attrs.fetch(:fulltext_indexed, false)
  @included_in_supertype_query = attrs.fetch(:included_in_supertype_query, false)

  @self_property_definitions = attrs.fetch(:property_definitions, [])
end