Class List Method List File List

# Class: VertxWeb::ThymeleafTemplateEngine

Inherits:
  TemplateEngine
  - Object
  - TemplateEngine
  - VertxWeb::ThymeleafTemplateEngine
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/thymeleaf_template_engine.rb

## Class Method Summary (collapse)

- + (Object) create

## Instance Method Summary (collapse)

- - (ThymeleafTemplateEngine) initialize(j_del) constructor
  A new instance of ThymeleafTemplateEngine.
- - (Object) j_del
- - (Object) render(arg0 = nil, arg1 = nil)
- - (Object) set_mode(mode = nil)

## Constructor Details

### - (`ThymeleafTemplateEngine`) initialize(j_del)

Returns a new instance of ThymeleafTemplateEngine

    11
    12
    13
    14
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/thymeleaf_template_engine.rb', line 11

    def initialize(j_del)
      super(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create

Raises:

- (`ArgumentError`)

    32
    33
    34
    35
    36
    37
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/thymeleaf_template_engine.rb', line 32

    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

### - (`Object`) j_del

    17
    18
    19
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/thymeleaf_template_engine.rb', line 17

    def j_del
      @j_del
    end

### - (`Object`) render(arg0 = nil, arg1 = nil)

Raises:

- (`ArgumentError`)

    24
    25
    26
    27
    28
    29
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/thymeleaf_template_engine.rb', line 24

    def render(arg0=nil,arg1=nil)
      if arg0.class.method_defined?(:j_del) && arg1.class == String && block_given?
        return @j_del.java_method(:render, [Java::IoVertxExtWeb::RoutingContext.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(arg0.j_del,arg1,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::Buffer) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling render(arg0,arg1)"
    end

### - (`Object`) set_mode(mode = nil)

Raises:

- (`ArgumentError`)

    41
    42
    43
    44
    45
    46
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/thymeleaf_template_engine.rb', line 41

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