Module: Hibachi::Recipe

Extended by:
ActiveSupport::Concern
Included in:
Model
Defined in:
lib/hibachi/recipe.rb

Overview

Methods for manipulating and reading the recipe of the model class, as well as defining whether this recipe is a singleton or collection.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#recipeObject

Return the recipe name as set in the class definition.



34
35
36
# File 'lib/hibachi/recipe.rb', line 34

def recipe
  self.class.recipe_name
end

#recipe_typeObject

Return the recipe type as set in the class definition. It’s a StringInquirer, so it defines methods that allow us to test whether this is a ‘collection?` or a `singleton?`.



41
42
43
# File 'lib/hibachi/recipe.rb', line 41

def recipe_type
  self.class.recipe_type
end