Class: Preseason

Inherits:
Object
  • Object
show all
Includes:
Colorize
Defined in:
lib/preseason.rb,
lib/preseason/config.rb,
lib/preseason/version.rb,
lib/preseason/colorize.rb,
lib/preseason/config/ie8.rb,
lib/preseason/config/heroku.rb,
lib/preseason/config/bitters.rb,
lib/preseason/config/bourbon.rb,
lib/preseason/config/factory.rb,
lib/preseason/config/database.rb,
lib/preseason/config/templating.rb,
lib/preseason/generator_context.rb,
lib/preseason/config/whiskey_disk.rb,
lib/preseason/config/authentication.rb

Defined Under Namespace

Modules: Colorize, Config, GeneratorContext Classes: Recipe

Constant Summary collapse

VERSION =
"1.0.0"

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Colorize

#ask, #readme, #yes?

Methods included from GeneratorContext

#method_missing

Constructor Details

#initialize(context) ⇒ Preseason

Returns a new instance of Preseason.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/preseason.rb', line 17

def initialize(context)
  Preseason::GeneratorContext.context = context

  @config = OpenStruct.new(
    :database       => Preseason::Config::Database.new,
    :factory        => Preseason::Config::Factory.new,
    :bourbon        => Preseason::Config::Bourbon.new,
    :bitters        => Preseason::Config::Bitters.new,
    :templating     => Preseason::Config::Templating.new,
    :authentication => Preseason::Config::Authentication.new,
    :ie8            => Preseason::Config::IE8.new,
    :heroku         => Preseason::Config::Heroku.new,
    :whiskey_disk   => Preseason::Config::WhiskeyDisk.new
  )
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.



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

def config
  @config
end

Instance Method Details

#game_on!Object



33
34
35
36
37
# File 'lib/preseason.rb', line 33

def game_on!
  ask_for_config
  prepare_recipes
  display_post_install_messages
end