Class: Jobshop::Dummy
- Inherits:
-
Object
- Object
- Jobshop::Dummy
- Defined in:
- lib/jobshop/dummy.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Dummy
constructor
A new instance of Dummy.
Constructor Details
#initialize ⇒ Dummy
Returns a new instance of Dummy.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/jobshop/dummy.rb', line 11 def initialize = { api: false, database: "postgresql", skip_gemfile: true, skip_git: true, skip_bundle: true, skip_listen: true, skip_test: true, template: template_path } if Dir.exists?(dummy_path) FileUtils.rmtree(dummy_path) dummy_constant = File.basename(dummy_path).gsub(/\W/, '_').squeeze('_').camelize Object.send(:remove_const, dummy_constant) end Rails::Generators::AppGenerator.new([ dummy_path ], ).invoke_all end |
Class Method Details
.generate ⇒ Object
6 7 8 |
# File 'lib/jobshop/dummy.rb', line 6 def generate new end |