Class: Potassium::ApplicationGenerator

Inherits:
Rails::Generators::AppGenerator
  • Object
show all
Defined in:
lib/potassium/generators/application.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.cli_optionsObject

Returns the value of attribute cli_options.



9
10
11
# File 'lib/potassium/generators/application.rb', line 9

def cli_options
  @cli_options
end

Instance Method Details

#finish_templateObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/potassium/generators/application.rb', line 12

def finish_template
  require_relative "../helpers/template-dsl"
  TemplateDSL.extend_dsl(self, source_path: __FILE__)
  template_location = File.expand_path('../templates/application.rb', File.dirname(__FILE__))
  instance_eval File.read(template_location), template_location
  super

  after_bundle do
    git :init
    git add: "."
    git commit: %{ -m 'Initial commit' -q }
  end
end