Class: VertxWeb::ThymeleafTemplateEngine

Inherits:
TemplateEngine show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/thymeleaf_template_engine.rb

Overview

A template engine that uses the Thymeleaf library.

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from TemplateEngine

#render

Class Method Details

+ (::VertxWeb::ThymeleafTemplateEngine) create

Create a template engine using defaults

Returns:

Raises:

  • (ArgumentError)


20
21
22
23
24
25
# File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/thymeleaf_template_engine.rb', line 20

def self.create
  if !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebTempl::ThymeleafTemplateEngine.java_method(:create, []).call(),::VertxWeb::ThymeleafTemplateEngine)
  end
  raise ArgumentError, "Invalid arguments when calling create()"
end

Instance Method Details

- (::VertxWeb::ThymeleafTemplateEngine) set_mode(mode = nil)

Set the mode for the engine

Parameters:

  • mode (String) (defaults to: nil)
    the mode

Returns:

Raises:

  • (ArgumentError)


29
30
31
32
33
34
# File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/thymeleaf_template_engine.rb', line 29

def set_mode(mode=nil)
  if mode.class == String && !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:setMode, [Java::java.lang.String.java_class]).call(mode),::VertxWeb::ThymeleafTemplateEngine)
  end
  raise ArgumentError, "Invalid arguments when calling set_mode(mode)"
end