Method: YACCL::Model::Type#initialize
- Defined in:
- lib/yaccl/model/type.rb
#initialize(hash = {}) ⇒ Type
Returns a new instance of Type.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/yaccl/model/type.rb', line 34 def initialize(hash={}) @id = hash[:id] @local_name = hash[:localName] @local_namespace = hash[:localNamespace] @query_name = hash[:queryName] @display_name = hash[:displayName] @base_id = hash[:baseId] @parent_id = hash[:parentId] @description = hash[:description] @creatable = hash[:creatable] @fileable = hash[:fileable] @queryable = hash[:queryable] @controllable_policy = hash[:controllablePolicy] @controllable_acl = hash[:controllableACL] @fulltext_indexed = hash[:fulltextIndexed] @included_in_supertype_query = hash[:includedInSupertypeQuery] @property_definitions = hash[:propertyDefinitions] || {} @property_definitions.each { |k, v| @property_definitions[k] = PropertyDefinition.new(v) } # document type @versionable = hash[:versionable] @content_stream_allowed = hash[:contentStreamAllowed] # relationship type @allowed_source_types = hash[:allowedSourceTypes] @allowed_target_types = hash[:allowedTargetTypes] end |