Sha256: d1bdf29e7eefd0548d7a6c0f7e2073d79c80a7b61211c6184078ed586199eca5

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

require 'mida_vocabulary/vocabulary'

module Mida
  module SchemaOrg

    autoload :Thing, 'mida_vocabulary/vocabularies/schemaorg/thing'
    autoload :Place, 'mida_vocabulary/vocabularies/schemaorg/place'
    autoload :Organization, 'mida_vocabulary/vocabularies/schemaorg/organization'
    autoload :LocalBusiness, 'mida_vocabulary/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

4 entries across 4 versions & 1 rubygems

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