Sha256: 37199a25f550d330139f1c8c137ea0e323c7425aac3a6d9e81c5c4e4ca68a927

Contents?: true

Size: 899 Bytes

Versions: 3

Compression:

Stored size: 899 Bytes

Contents

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

module Mida
  module DataVocabulary
    autoload :Organization, 'mida_vocabulary/vocabularies/data_vocabulary/organization'
    autoload :Person, 'mida_vocabulary/vocabularies/data_vocabulary/person'
    
    class Review < Mida::Vocabulary
      itemtype %r{http://data-vocabulary.org/Review}i
      include_vocabulary Mida::DataVocabulary::Item

      has_one('rating') { extract Mida::DataType::Number }

      has_one 'reviewer' do
        extract Mida::DataVocabulary::Person
        extract Mida::DataType::Text
      end

      has_many('dtreviewed') { extract Mida::DataType::ISO8601Date }

      has_many 'description'
      has_many 'summary'
      
      has_many 'itemreviewed' do
        extract Mida::DataVocabulary::Item
        extract Mida::DataType::Text
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mida_vocabulary-0.2.2 lib/mida_vocabulary/vocabularies/data_vocabulary/review.rb
mida_vocabulary-0.2 lib/mida_vocabulary/vocabularies/data_vocabulary/review.rb
mida_vocabulary-0.1.3 lib/mida_vocabulary/vocabularies/data_vocabulary/review.rb