Class: RecipeBox::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/recipe_box/cli.rb

Instance Method Summary collapse

Instance Method Details

#insert(name) ⇒ Object



4
5
6
# File 'lib/recipe_box/cli.rb', line 4

def insert(name)
  CreateRecipe.start([name])
end

#new(name) ⇒ Object



16
17
18
# File 'lib/recipe_box/cli.rb', line 16

def new(name)
  CreateRecipeBox.start([name])
end

#remove(name) ⇒ Object



9
10
11
12
13
# File 'lib/recipe_box/cli.rb', line 9

def remove(name)
  if yes?("Warning: this will remove the directory #{name} and all its contents. Proceed?")
    RemoveRecipe.start([name])
  end
end