lib/mida_vocabulary/vocabularies/schemaorg/recipe.rb in mida_vocabulary-0.1.3 vs lib/mida_vocabulary/vocabularies/schemaorg/recipe.rb in mida_vocabulary-0.2

- old
+ new

@@ -1,61 +1,17 @@ require 'mida_vocabulary/vocabulary' module Mida module SchemaOrg - autoload :Thing, 'mida_vocabulary/vocabularies/schemaorg/thing' autoload :CreativeWork, 'mida_vocabulary/vocabularies/schemaorg/creativework' - autoload :Duration, 'mida_vocabulary/vocabularies/schemaorg/duration' - autoload :NutritionInformation, 'mida_vocabulary/vocabularies/schemaorg/nutritioninformation' + autoload :Thing, 'mida_vocabulary/vocabularies/schemaorg/thing' # A recipe. class Recipe < Mida::Vocabulary itemtype %r{http://schema.org/Recipe}i - include_vocabulary Mida::SchemaOrg::Thing include_vocabulary Mida::SchemaOrg::CreativeWork - - # The time it takes to actually cook the dish, in ISO 8601 duration format. - has_many 'cookTime' do - extract Mida::SchemaOrg::Duration - extract Mida::DataType::Text - end - - # The method of cooking, such as Frying, Steaming, ... - has_many 'cookingMethod' - - # An ingredient used in the recipe. - has_many 'ingredients' - - # Nutrition information about the recipe. - has_many 'nutrition' do - extract Mida::SchemaOrg::NutritionInformation - extract Mida::DataType::Text - end - - # The length of time it takes to prepare the recipe, in ISO 8601 duration format. - has_many 'prepTime' do - extract Mida::SchemaOrg::Duration - extract Mida::DataType::Text - end - - # The category of the recipe - for example, appetizer, entree, etc. - has_many 'recipeCategory' - - # The cuisine of the recipe (for example, French or Ethopian). - has_many 'recipeCuisine' - - # The steps to make the dish. - has_many 'recipeInstructions' - - # The quantity produced by the recipe (for example, number of people served, number of servings, etc). - has_many 'recipeYield' - - # The total time it takes to prepare and cook the recipe, in ISO 8601 duration format. - has_many 'totalTime' do - extract Mida::SchemaOrg::Duration - extract Mida::DataType::Text - end + include_vocabulary Mida::SchemaOrg::Thing end end end