Sha256: d0cd2f0f88155c1ccf99a1dc2b7ea99fd142fabe48ddbd9c7c353943ce788433

Contents?: true

Size: 814 Bytes

Versions: 5

Compression:

Stored size: 814 Bytes

Contents

# frozen_string_literal: true
require 'happymapper'
require_relative './node'
require_relative './length'
require_relative './price'
require_relative './rixml_type/normalized_string'
require_relative './rixml_type/yes_no_boolean'

module RixmlDocument
  class Resource < Node
    include HappyMapper
    tag 'Resource'

    has_one :length, Length, tag: 'Length', xpath: './'
    has_one :price, Price, tag: 'Price', xpath: './'

    attribute :resource_id, RixmlType::NormalizedString, tag: 'resourceID'
    attribute :language, RixmlType::NormalizedString, tag: 'language'
    attribute :primary_indicator, RixmlType::YesNoBoolean, tag: 'primaryIndicator'
    attribute :size_in_bytes, Integer, tag: 'sizeInBytes'

    element :mime_type, String, tag: 'MIMEType'
    element :name, String, tag: 'Name'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rixml-0.5.6 lib/rixml_document/resource.rb
rixml-0.5.5 lib/rixml_document/resource.rb
rixml-0.5.4 lib/rixml_document/resource.rb
rixml-0.5.3 lib/rixml_document/resource.rb
rixml-0.5.2 lib/rixml_document/resource.rb