Sha256: 259ca22ab4de22c9721d814511816e5db45b62a3b5b42ce250a186d611e42739

Contents?: true

Size: 490 Bytes

Versions: 9

Compression:

Stored size: 490 Bytes

Contents

require "rails/generators"
require "rails/generators/rails/app/app_generator"
require "inquirer"

module Potassium
  class ApplicationGenerator < Rails::Generators::AppGenerator
    def finish_template
      require_relative "./helpers/template-dsl"
      TemplateDSL.extend_dsl(self, source_path: __FILE__)
      template_location = File.expand_path('./template.rb', File.dirname(__FILE__))
      instance_eval File.read(template_location), template_location
      super
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
potassium-1.3.5 lib/potassium/templates/application/generator.rb
potassium-1.3.4 lib/potassium/templates/application/generator.rb
potassium-1.3.3 lib/potassium/templates/application/generator.rb
potassium-1.3.2 lib/potassium/templates/application/generator.rb
potassium-1.3.0 lib/potassium/templates/application/generator.rb
potassium-1.2.4 lib/potassium/templates/application/generator.rb
potassium-1.2.3 lib/potassium/templates/application/generator.rb
potassium-1.2.2 lib/potassium/templates/application/generator.rb
potassium-1.2.1 lib/potassium/templates/application/generator.rb