Class: JspTemplateEngine

Inherits:
VraptorScaffold::Base show all
Defined in:
lib/vraptor-scaffold/generators/app/jsp_template_engine.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_path, options) ⇒ JspTemplateEngine

Returns a new instance of JspTemplateEngine



7
8
9
10
11
# File 'lib/vraptor-scaffold/generators/app/jsp_template_engine.rb', line 7

def initialize(project_path, options)
  super
  self.destination_root=(project_path)
  @options = options
end

Class Method Details

.source_rootObject



3
4
5
# File 'lib/vraptor-scaffold/generators/app/jsp_template_engine.rb', line 3

def self.source_root
  File.join(File.dirname(__FILE__), "templates", "jsp")
end

Instance Method Details

#configureObject



13
14
15
16
17
18
# File 'lib/vraptor-scaffold/generators/app/jsp_template_engine.rb', line 13

def configure
  template("../decorators.erb", File.join(Configuration::WEB_INF, "decorators.xml"))
  template("main.jsp.erb", File.join(Configuration::WEB_INF, decorators_path, "main.jsp"))
  copy_file("prelude.jspf", File.join(Configuration::WEB_INF, "jsp", "prelude.jspf"))
  append_prelude_config
end

#decorators_pathObject



24
25
26
# File 'lib/vraptor-scaffold/generators/app/jsp_template_engine.rb', line 24

def decorators_path
  File.join "jsp", "decorators"
end

#extensionObject



20
21
22
# File 'lib/vraptor-scaffold/generators/app/jsp_template_engine.rb', line 20

def extension
  "jsp"
end