S4 class containing recipes, their ingredients and meal plans
Source:R/RecipeBook-class.R
, R/RecipeBook-methods.R
RecipeBook-class.Rd
An RecipeBook-class
object contains 3 components; 1. a set of recipes
retrievable using recipes()
, 2. a meal plan created using
create_meal_plan()
and 3. a shopping list created using
create_shopping_list()
.
Arguments
- names
character()
containing the name of of recipes.- ingredients
character()
orlist()
ofIngredient-class
objects. If acharacter()
, will be read in usingread_ingredients()
.- object
a
RecipeBook-class
object.- x
a
RecipeBook-class
object.- value
tibble::tibble()
which will be used to set therecipes
slot.
Slots
recipes
tibble::tibble()
storing the names, ingredients and favourites status of recipes.meal_plan
tibble::tibble()
storing a meal plan, created bycreate_meal_plan()
.shopping_list
tibble::tibble()
storing a shopping list, created bycreate_shopping_list()
.
Displaying
show(recipebook)
prints the recipes
as a tibble::tibble()
.
Getters
names(recipebook)
obtains the names of the recipes.
length(recipebook)
obtains the number of recipes.
recipes(recipebook)
obtains the recipes
as a tibble::tibble()
.
meal_plan(recipebook)
obtains the meal_plan
as a tibble::tibble()
.
shopping_list(recipebook)
obtains the shopping_list
as a
tibble::tibble()
.
favourites(recipebook)
obtains the recipes
marked as favourites.