Class: KittyGen::Cook

Inherits:
Object
  • Object
show all
Defined in:
lib/kitty_gen/cook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCook

Returns a new instance of Cook.



6
7
8
9
# File 'lib/kitty_gen/cook.rb', line 6

def initialize
   @generator = Rails::Generators::AppGenerator.new [Dir.pwd], {}, :destination_root => Dir.pwd 
   generator.extend(::KittyGen::Helpers)
end

Instance Attribute Details

#generatorObject (readonly)

Returns the value of attribute generator.



4
5
6
# File 'lib/kitty_gen/cook.rb', line 4

def generator
  @generator
end

Instance Method Details

#cook(template) ⇒ Object



11
12
13
# File 'lib/kitty_gen/cook.rb', line 11

def cook(template)
   generator.recipe template
end