Class: HotGlue::NavTemplateGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- HotGlue::NavTemplateGenerator
- Defined in:
- lib/generators/hot_glue/nav_template_generator.rb
Instance Method Summary collapse
- #filepath_prefix ⇒ Object
-
#initialize(*args) ⇒ NavTemplateGenerator
constructor
:nodoc:.
Constructor Details
#initialize(*args) ⇒ NavTemplateGenerator
:nodoc:
12 13 14 15 16 17 |
# File 'lib/generators/hot_glue/nav_template_generator.rb', line 12 def initialize(*args) #:nodoc: super @namespace = ['namespace'] copy_file "erb/_nav.html.erb", "#{'spec/dummy/' if $INTERNAL_SPECS}app/views/#{@namespace ? @namespace + "/" : ""}_nav.html.erb" end |
Instance Method Details
#filepath_prefix ⇒ Object
6 7 8 9 |
# File 'lib/generators/hot_glue/nav_template_generator.rb', line 6 def filepath_prefix # todo: inject the context 'spec/dummy/' if $INTERNAL_SPECS end |