Class: VertxWebTemplThymeleaf::ThymeleafTemplateEngine
- Inherits:
-
VertxWebCommon::TemplateEngine
show all
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-templ-thymeleaf/thymeleaf_template_engine.rb
Overview
A template engine that uses the Thymeleaf library.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary
(collapse)
Instance Method Summary
(collapse)
#render
Class Method Details
+ (Boolean) accept?(obj)
21
22
23
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-templ-thymeleaf/thymeleaf_template_engine.rb', line 21
def @@j_api_type.accept?(obj)
obj.class == ThymeleafTemplateEngine
end
|
Create a template engine using defaults
55
56
57
58
59
60
61
62
63
64
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-templ-thymeleaf/thymeleaf_template_engine.rb', line 55
def self.create(*args)
if args[0].class.method_defined?(:j_del) && !block_given?
return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebTemplThymeleaf::ThymeleafTemplateEngine.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(args[0].j_del),::VertxWebTemplThymeleaf::ThymeleafTemplateEngine)
end
if defined?(super)
super
else
raise ArgumentError, "Invalid arguments when calling create(#{args[0]})"
end
end
|
+ (Object) DEFAULT_TEMPLATE_MODE
65
66
67
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-templ-thymeleaf/thymeleaf_template_engine.rb', line 65
def self.DEFAULT_TEMPLATE_MODE
Java::IoVertxExtWebTemplThymeleaf::ThymeleafTemplateEngine.DEFAULT_TEMPLATE_MODE.name.intern
end
|
+ (Object) j_api_type
30
31
32
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-templ-thymeleaf/thymeleaf_template_engine.rb', line 30
def self.j_api_type
@@j_api_type
end
|
+ (Object) j_class
33
34
35
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-templ-thymeleaf/thymeleaf_template_engine.rb', line 33
def self.j_class
Java::IoVertxExtWebTemplThymeleaf::ThymeleafTemplateEngine.java_class
end
|
+ (Object) unwrap(obj)
27
28
29
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-templ-thymeleaf/thymeleaf_template_engine.rb', line 27
def @@j_api_type.unwrap(obj)
obj.j_del
end
|
+ (Object) wrap(obj)
24
25
26
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-templ-thymeleaf/thymeleaf_template_engine.rb', line 24
def @@j_api_type.wrap(obj)
ThymeleafTemplateEngine.new(obj)
end
|
Instance Method Details
- (self) setMode(mode)
Set the mode for the engine
40
41
42
43
44
45
46
47
48
49
50
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-templ-thymeleaf/thymeleaf_template_engine.rb', line 40
def set_mode(*args)
if args[0].class == Symbol && !block_given?
@j_del.java_method(:setMode, [Java::OrgThymeleafTemplatemode::TemplateMode.java_class]).call(Java::OrgThymeleafTemplatemode::TemplateMode.valueOf(args[0].to_s))
return self
end
if defined?(super)
super
else
raise ArgumentError, "Invalid arguments when calling set_mode(#{args[0]})"
end
end
|