Class: Cocina::Models::Description

Inherits:
Struct
  • Object
show all
Defined in:
lib/cocina/models/description.rb

Class Method Summary collapse

Class Method Details

.new(attributes = default_attributes, safe = false, validate = true, &block) ⇒ Object



22
23
24
25
# File 'lib/cocina/models/description.rb', line 22

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