Class: SnFoil::ContextGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SnFoil::ContextGenerator
- Defined in:
- lib/generators/snfoil/context/context_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_app_file ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/generators/snfoil/context/context_generator.rb', line 25 def add_app_file file_name = if modules.length.zero? name else "#{modules.join('/')}/#{name}" end template('context.erb', "#{[:path]}/#{file_name}_context.rb") end |