Sha256: a679ba6c6a31b6b19ccbcc33ec4a67fce3070acf09b92d7024bca51983655cf2

Contents?: true

Size: 750 Bytes

Versions: 4

Compression:

Stored size: 750 Bytes

Contents

require 'mida_vocabulary/vocabulary'
require 'mida_vocabulary/vocabularies/data_vocabulary/item'

module Mida
  module DataVocabulary
    autoload :Product, 'mida_vocabulary/vocabularies/data_vocabulary/product'

    class OfferAggregate < Mida::Vocabulary
      itemtype %r{http://data-vocabulary.org/Offer-aggregate/}i
      include_vocabulary Mida::DataVocabulary::Item

      for field in %w{lowPrice highPrice currency condition offerURL identifier}
        has_many field
      end

      has_many 'offerCount' do
        extract Mida::DataType::Number
        extract Mida::DataType::Text
      end

      has_many 'itemOffered' do
        extract Mida::DataVocabulary::Product
        extract Mida::DataType::Text
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mida_vocabulary-0.2.2 lib/mida_vocabulary/vocabularies/data_vocabulary/offeraggregate.rb
mida_vocabulary-0.2 lib/mida_vocabulary/vocabularies/data_vocabulary/offer_aggregate.rb
mida_vocabulary-0.1.3 lib/mida_vocabulary/vocabularies/data_vocabulary/offer_aggregate.rb
mida_vocabulary-0.1.2 lib/mida_vocabulary/vocabularies/data_vocabulary/offer_aggregate.rb