Module: Hibachi::Recipe
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
-
#recipe ⇒ Object
Return the recipe name as set in the class definition.
-
#recipe_type ⇒ Object
Return the recipe type as set in the class definition.
Instance Method Details
#recipe ⇒ Object
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_type ⇒ Object
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 |