Sha256: 80b69161d94747685f64190ee9908ad9d1d0657273de95475bf127f15315703d

Contents?: true

Size: 684 Bytes

Versions: 9

Compression:

Stored size: 684 Bytes

Contents

require 'xml/mapping'
require 'xml/mapping_extensions'

module Stash
  module Wrapper
    # Mapping for `<st:version>`
    class Version
      include ::XML::Mapping
      numeric_node :version_number, 'version_number'
      date_node :date, 'date', zulu: true
      text_node :note, 'note', default_value: nil

      # Creates a new {Version}
      # @param number [Integer] the version number
      # @param date [Date] the date the new version was created
      # @param note [String, nil] the (optional) version note
      def initialize(number:, date:, note: nil)
        self.version_number = number
        self.date = date
        self.note = note
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
stash-wrapper-0.1.9 lib/stash/wrapper/version.rb
stash-wrapper-0.1.8 lib/stash/wrapper/version.rb
stash-wrapper-0.1.7 lib/stash/wrapper/version.rb
stash-wrapper-0.1.6 lib/stash/wrapper/version.rb
stash-wrapper-0.1.5 lib/stash/wrapper/version.rb
stash-wrapper-0.1.4 lib/stash/wrapper/version.rb
stash-wrapper-0.1.3 lib/stash/wrapper/version.rb
stash-wrapper-0.1.2 lib/stash/wrapper/version.rb
stash-wrapper-0.1.1 lib/stash/wrapper/version.rb