Sha256: 3a014616f65b25c888246cd184ee59e374f95a2b2df185bd54bdf37abac44929

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 KB

Contents

require 'mida/vocabulary'

module Mida
  module SchemaOrg

    autoload :Thing, 'mida/vocabularies/schemaorg/thing'
    autoload :CreativeWork, 'mida/vocabularies/schemaorg/creativework'
    autoload :Rating, 'mida/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 rating 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

6 entries across 6 versions & 1 rubygems

Version Path
mida-0.4.0 lib/mida/vocabularies/schemaorg/review.rb
mida-0.3.9 lib/mida/vocabularies/schemaorg/review.rb
mida-0.3.8 lib/mida/vocabularies/schemaorg/review.rb
mida-0.3.7 lib/mida/vocabularies/schemaorg/review.rb
mida-0.3.6 lib/mida/vocabularies/schemaorg/review.rb
mida-0.3.3 lib/mida/vocabularies/schemaorg/review.rb