Class: Preseason::Recipe::Database

Inherits:
Preseason::Recipe show all
Defined in:
lib/preseason/recipe/database.rb

Instance Attribute Summary

Attributes inherited from Preseason::Recipe

#config

Instance Method Summary collapse

Methods inherited from Preseason::Recipe

#initialize, #post_install_hook

Methods included from Colorize

#ask, #readme, #yes?

Methods included from GeneratorContext

#method_missing

Constructor Details

This class inherits a constructor from Preseason::Recipe

Dynamic Method Handling

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

Instance Method Details

#prepareObject



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

def prepare
  config.database.sqlite? ? prepare_sqlite : prepare_default
  append_to_file '.gitignore', "\n#{db_yml}"
end

#recipe_rootObject



2
3
4
5
# File 'lib/preseason/recipe/database.rb', line 2

def recipe_root
  # this is only used in the sqlite context
  "#{template_path}/sqlite"
end