Sha256: a2ec5b0f0ef2f5492fa502d541385d5f6943b45cfe72b334622cf0135c996aff

Contents?: true

Size: 753 Bytes

Versions: 4

Compression:

Stored size: 753 Bytes

Contents

# frozen_string_literal: true

module Ieee
  module Idams
    # Article related date
    class ArticleDate < Lutaml::Model::Serializable
      # <date datetype="OriginalPub">
      #   <year>1997</year>
      #   <month>April</month>
      #   <day>3</day>
      # </date>
      # <date datetype="ePub">
      #   <year>2019</year>
      #   <month>4</month>
      #   <day>26</day>
      # </date>

      attribute :datetype, :string
      attribute :year, :string
      attribute :month, :string
      attribute :day, :string

      xml do
        root "date"

        map_attribute "datetype", to: :datetype
        map_element "year", to: :year
        map_element "month", to: :month
        map_element "day", to: :day
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ieee-idams-0.2.9 lib/ieee/idams/article_date.rb
ieee-idams-0.2.8 lib/ieee/idams/article_date.rb
ieee-idams-0.2.7 lib/ieee/idams/article_date.rb
ieee-idams-0.2.6 lib/ieee/idams/article_date.rb