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

Included in:
AppGenerator
Defined in:
lib/stationed/generators/plugins/haml.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/haml.rb', line 5

def self.prepended(base)
  base.class_option :haml,
    type: :boolean,
    default: true,
    desc: 'Include Haml as template engine'
end

Instance Method Details

#finish_templateObject



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

def finish_template
  return super unless options[:haml]
  gem 'haml-rails'
  super
end