Sha256: febe60ca78c121c56b08b54c577a23c9664ff3999c7cc1b92022583ae7250cb8

Contents?: true

Size: 1009 Bytes

Versions: 1

Compression:

Stored size: 1009 Bytes

Contents

# coding: utf-8

module ONIX
  class AudienceRange
    include ROXML

    xml_name "AudienceRange"

    xml_accessor :audience_range_qualifier, :from => "AudienceRangeQualifier", :as => Fixnum, :to_xml => ONIX::Formatters.two_digit
    xml_accessor :audience_range_precisions, :from => "AudienceRangePrecision", :as => [Fixnum], :to_xml => [ONIX::Formatters.two_digit] # TODO: two_digit isn't working on the array items
    xml_accessor :audience_range_values, :from => "AudienceRangeValue"

    # TODO: element AudienceRange: validity error :
    #   Element AudienceRange content does not follow the DTD, expecting
    #   (AudienceRangeQualifier , AudienceRangePrecision , AudienceRangeValue ,
    #   (AudienceRangePrecision , AudienceRangeValue)?),
    #   got
    #   (AudienceRangeQualifier AudienceRangePrecision AudienceRangePrecision
    #   AudienceRangeValue AudienceRangeValue )
    def initialize
      self.audience_range_precisions = []
      self.audience_range_values = []
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
onix-0.9.5 lib/onix/audience_range.rb