Sha256: 14fdd9d2802932b9b6b5a0cc95405815bdea969c84129b793505a328573e9119

Contents?: true

Size: 1.11 KB

Versions: 4

Compression:

Stored size: 1.11 KB

Contents

require 'mida_vocabulary/vocabulary'

module Mida
  module SchemaOrg

    autoload :Thing, 'mida_vocabulary/vocabularies/schemaorg/thing'
    autoload :CreativeWork, 'mida_vocabulary/vocabularies/schemaorg/creativework'
    autoload :Rating, 'mida_vocabulary/vocabularies/schemaorg/rating'

    # A review of an item - for example, a restaurant, movie, or store.
    class Review < Mida::Vocabulary
      itemtype %r{http://schema.org/Review}i
      include_vocabulary Mida::SchemaOrg::Thing
      include_vocabulary Mida::SchemaOrg::CreativeWork

      # The item that is being reviewed/rated.
      has_many 'itemReviewed' do
        extract Mida::SchemaOrg::Thing
        extract Mida::DataType::Text
      end

      # The actual body of the review
      has_many 'reviewBody'

      # The rating given in this review. Note that reviews can themselves be rated. The reviewRating applies to rating given by the review. The aggregateRating property applies to the review itself, as a creative work.
      has_many 'reviewRating' do
        extract Mida::SchemaOrg::Rating
        extract Mida::DataType::Text
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mida_vocabulary-0.1.3 lib/mida_vocabulary/vocabularies/schemaorg/review.rb
mida_vocabulary-0.1.2 lib/mida_vocabulary/vocabularies/schemaorg/review.rb
mida_vocabulary-0.1.1 lib/mida_vocabulary/vocabularies/schemaorg/review.rb
mida_vocabulary-0.1 lib/mida_vocabulary/vocabularies/schemaorg/review.rb