Sha256: 6b5c74749644f5678bdac0d93f2faa1a61478a813a146835a2b42d9829139240
Contents?: true
Size: 1.03 KB
Versions: 3
Compression:
Stored size: 1.03 KB
Contents
# frozen_string_literal: true module Cocina module Models class AdminPolicy < Struct include Checkable TYPES = ['http://cocina.sul.stanford.edu/models/admin_policy.jsonld'].freeze # The version of Cocina with which this object conforms. # example: 1.2.3 attribute :cocinaVersion, Types::Strict::String.default(Cocina::Models::VERSION) attribute :type, Types::Strict::String.enum(*AdminPolicy::TYPES) # example: druid:bc123df4567 attribute :externalIdentifier, Types::Strict::String attribute :label, Types::Strict::String attribute :version, Types::Strict::Integer attribute(:administrative, AdminPolicyAdministrative.default { AdminPolicyAdministrative.new }) attribute :description, Description.optional.meta(omittable: true) def self.new(attributes = default_attributes, safe = false, validate = true, &block) Validator.validate(self, attributes.with_indifferent_access) if validate && name super(attributes, safe, &block) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cocina-models-0.65.1 | lib/cocina/models/admin_policy.rb |
cocina-models-0.65.0 | lib/cocina/models/admin_policy.rb |
cocina-models-0.64.0 | lib/cocina/models/admin_policy.rb |