Class: HotGlue::NavTemplateGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/hot_glue/nav_template_generator.rb

Instance Method Summary collapse

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 = options['namespace']
  copy_file "erb/_nav.html.erb", "#{'spec/dummy/' if $INTERNAL_SPECS}app/views/#{@namespace ? @namespace + "/" : ""}_nav.html.erb"

end

Instance Method Details

#filepath_prefixObject



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