Class: Preseason::Recipe

Inherits:
Object
  • Object
show all
Includes:
Colorize, GeneratorContext
Defined in:
lib/preseason/recipe.rb

Defined Under Namespace

Classes: ActiveAdmin, Application, Bitters, Bourbon, Bundle, CustomErrorPages, Database, Devise, Flash, Foreman, Gemfile, Git, Gitignore, Guard, Heroku, IE8, Initializer, Production, Routes, Rspec, Rvm, Schedule, WhiskeyDisk, ZeusRspec

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Colorize

#ask, #readme, #yes?

Methods included from GeneratorContext

#method_missing

Constructor Details

#initialize(config) ⇒ Recipe

Returns a new instance of Recipe.



9
10
11
# File 'lib/preseason/recipe.rb', line 9

def initialize(config)
  @config = config
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Preseason::GeneratorContext

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



7
8
9
# File 'lib/preseason/recipe.rb', line 7

def config
  @config
end

Instance Method Details

#post_install_hookObject



17
18
19
# File 'lib/preseason/recipe.rb', line 17

def post_install_hook
  # implement in child classes
end

#recipe_rootObject



13
14
15
# File 'lib/preseason/recipe.rb', line 13

def recipe_root
  "#{template_path}/#{self.class.name.demodulize.underscore}"
end