Class: JspTemplateEngine
- Inherits:
-
VraptorScaffold::Base
- Object
- Thor::Group
- VraptorScaffold::Base
- JspTemplateEngine
- Defined in:
- lib/vraptor-scaffold/generators/app/jsp_template_engine.rb
Class Method Summary collapse
Instance Method Summary collapse
- #configure ⇒ Object
- #decorators_path ⇒ Object
- #extension ⇒ Object
-
#initialize(project_path, options) ⇒ JspTemplateEngine
constructor
A new instance of JspTemplateEngine.
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, ) super self.destination_root=(project_path) @options = end |
Class Method Details
.source_root ⇒ Object
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
#configure ⇒ Object
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_path ⇒ Object
24 25 26 |
# File 'lib/vraptor-scaffold/generators/app/jsp_template_engine.rb', line 24 def decorators_path File.join "jsp", "decorators" end |
#extension ⇒ Object
20 21 22 |
# File 'lib/vraptor-scaffold/generators/app/jsp_template_engine.rb', line 20 def extension "jsp" end |