Sha256: 528f1f0de67d2d7b332ae9a570396d3448c12cf18ff04c15fdc247622bccc106

Contents?: true

Size: 579 Bytes

Versions: 9

Compression:

Stored size: 579 Bytes

Contents

# frozen_string_literal: true

module Cocina
  module Models
    # Subschema for release tags
    class ReleaseTag < Struct
      attribute :to, Types::Strict::String.enum('Searchworks', 'Earthworks')
      attribute :what, Types::Strict::String.enum('self', 'collection')
      # we use 'when' other places, but that's reserved word, so 'date' it is!
      attribute :date, Types::Params::DateTime
      attribute :who, Types::Strict::String
      attribute :release, Types::Params::Bool

      def self.from_dynamic(dyn)
        ReleaseTag.new(dyn)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cocina-models-0.26.0 lib/cocina/models/release_tag.rb
cocina-models-0.25.0 lib/cocina/models/release_tag.rb
cocina-models-0.24.0 lib/cocina/models/release_tag.rb
cocina-models-0.23.0 lib/cocina/models/release_tag.rb
cocina-models-0.22.2 lib/cocina/models/release_tag.rb
cocina-models-0.22.1 lib/cocina/models/release_tag.rb
cocina-models-0.22.0 lib/cocina/models/release_tag.rb
cocina-models-0.21.0 lib/cocina/models/release_tag.rb
cocina-models-0.20.0 lib/cocina/models/release_tag.rb