Sha256: 2b83852dc356c9ae4c045c0d251c29433e987ed9d40da80740911f34ddc79178

Contents?: true

Size: 481 Bytes

Versions: 6

Compression:

Stored size: 481 Bytes

Contents

require 'xml/mapping_extensions'
require 'stash/wrapper/identifier_type'

module Stash
  module Wrapper

    # Mapping class for `<st:identifier>`
    class Identifier
      include ::XML::Mapping
      typesafe_enum_node :type, '@type', class: IdentifierType, default_value: nil
      text_node :value, '.', default_value: nil

      # Creates a new {Identifier}
      def initialize(type:, value:)
        self.type = type
        self.value = value
      end
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stash-wrapper-0.1.9 lib/stash/wrapper/identifier.rb
stash-wrapper-0.1.8 lib/stash/wrapper/identifier.rb
stash-wrapper-0.1.7 lib/stash/wrapper/identifier.rb
stash-wrapper-0.1.6 lib/stash/wrapper/identifier.rb
stash-wrapper-0.1.5 lib/stash/wrapper/identifier.rb
stash-wrapper-0.1.4 lib/stash/wrapper/identifier.rb