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

- (JspTemplateEngine) initialize(project_path, options)



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

+ (Object) source_root



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

- (Object) configure



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

- (Object) decorators_path



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

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

- (Object) extension



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

def extension
  "jsp"
end