Class: SnFoil::SearcherGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SnFoil::SearcherGenerator
- Defined in:
- lib/generators/snfoil/searcher/searcher_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/searcher/searcher_generator.rb', line 25 def add_app_file file_name = if modules.length.zero? name else "#{modules.join('/')}/#{name}" end template('searcher.erb', "#{[:path]}/#{file_name}_searcher.rb") end |