Class: NavigationConfigGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- NavigationConfigGenerator
- Defined in:
- lib/generators/navigation_config/navigation_config_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/generators/navigation_config/navigation_config_generator.rb', line 2 def self.source_root @source_root ||= begin tpl_dir = %w[.. .. .. .. generators navigation_config templates] tpl_dir_path = File.join(tpl_dir) File.(tpl_dir_path, __FILE__) end end |
Instance Method Details
#navigation_config ⇒ Object
12 13 14 15 16 |
# File 'lib/generators/navigation_config/navigation_config_generator.rb', line 12 def copy_file('config/navigation.rb', 'config/navigation.rb') readme_path = File.join(%w[.. .. .. .. README.md]) say File.read(File.(readme_path, __FILE__)) end |