Module: Stationed::Generators::Plugins::Generators

Included in:
AppGenerator
Defined in:
lib/stationed/generators/plugins/generators.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



5
6
7
8
9
10
# File 'lib/stationed/generators/plugins/generators.rb', line 5

def self.prepended(base)
  base.class_option :generators,
    type: :boolean,
    default: true,
    desc: 'Set up default generators to disable helpers, assets, etc'
end

Instance Method Details

#finish_templateObject



12
13
14
15
16
# File 'lib/stationed/generators/plugins/generators.rb', line 12

def finish_template
  return super unless options[:generators]
  copy_file 'generators.rb', 'config/initializers/generators.rb'
  super
end