Sha256: b912cef097c8cb2f1dc8b1cc735a55ffa2e79a087915295b6794017aee388e00

Contents?: true

Size: 1.08 KB

Versions: 6

Compression:

Stored size: 1.08 KB

Contents

require 'mida/vocabulary'

module Mida
  module SchemaOrg

    autoload :Thing, 'mida/vocabularies/schemaorg/thing'
    autoload :Place, 'mida/vocabularies/schemaorg/place'
    autoload :Organization, 'mida/vocabularies/schemaorg/organization'
    autoload :LocalBusiness, 'mida/vocabularies/schemaorg/localbusiness'

    # A food-related business.
    class FoodEstablishment < Mida::Vocabulary
      itemtype %r{http://schema.org/FoodEstablishment}i
      include_vocabulary Mida::SchemaOrg::Thing
      include_vocabulary Mida::SchemaOrg::Place
      include_vocabulary Mida::SchemaOrg::Organization
      include_vocabulary Mida::SchemaOrg::LocalBusiness

      # Either Yes/No, or a URL at which reservations can be made.
      has_many 'acceptsReservations' do
        extract Mida::DataType::URL
        extract Mida::DataType::Text
      end

      # Either the actual menu or a URL of the menu.
      has_many 'menu' do
        extract Mida::DataType::URL
        extract Mida::DataType::Text
      end

      # The cuisine of the restaurant.
      has_many 'servesCuisine'
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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