Class: Tokamak::Recipes

Inherits:
Object
  • Object
show all
Defined in:
lib/tokamak/recipes.rb

Constant Summary collapse

@@recipes =
{}

Class Method Summary collapse

Class Method Details

.[](recipe_name) ⇒ Object



15
16
17
# File 'lib/tokamak/recipes.rb', line 15

def [](recipe_name)
  @@recipes[recipe_name]
end

.add(recipe_name, &block) ⇒ Object



7
8
9
# File 'lib/tokamak/recipes.rb', line 7

def add(recipe_name, &block)
  @@recipes[recipe_name] = block
end

.listObject



19
20
21
# File 'lib/tokamak/recipes.rb', line 19

def list
  @@recipes.keys
end

.remove(recipe_name) ⇒ Object



11
12
13
# File 'lib/tokamak/recipes.rb', line 11

def remove(recipe_name)
  @@recipes.delete(recipe_name)
end