lib/cocina/models/request_admin_policy.rb in cocina-models-0.65.1 vs lib/cocina/models/request_admin_policy.rb in cocina-models-0.66.0

- old
+ new

@@ -1,10 +1,12 @@ # frozen_string_literal: true module Cocina module Models class RequestAdminPolicy < Struct + include Validatable + include Checkable TYPES = ['http://cocina.sul.stanford.edu/models/admin_policy.jsonld'].freeze # The version of Cocina with which this object conforms. @@ -13,13 +15,8 @@ attribute :type, Types::Strict::String.enum(*RequestAdminPolicy::TYPES) attribute :label, Types::Strict::String attribute :version, Types::Strict::Integer attribute(:administrative, AdminPolicyAdministrative.default { AdminPolicyAdministrative.new }) attribute :description, RequestDescription.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