Class List Method List File List

# Class: VertxWeb::MVELTemplateEngine

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

## Overview

A template engine that uses the Handlebars library.

## Class Method Summary (collapse)

- + (::VertxWeb::MVELTemplateEngine) create
  Create a template engine using defaults.

## Instance Method Summary (collapse)

- - (::VertxWeb::MVELTemplateEngine) set_extension(extension = nil)
  Set the extension for the engine.
- - (::VertxWeb::MVELTemplateEngine) set_max_cache_size(maxCacheSize = nil)
  Set the max cache size for the engine.

### Methods inherited from TemplateEngine

#render

## Class Method Details

### + (`::VertxWeb::MVELTemplateEngine`) create

Create a template engine using defaults

Returns:

- (`::VertxWeb::MVELTemplateEngine`) —
  the engine

Raises:

- (`ArgumentError`)

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

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

## Instance Method Details

### - (`::VertxWeb::MVELTemplateEngine`) set_extension(extension = nil)

Set the extension for the engine

Parameters:

- extension (`String`) (defaults to: `nil`) —
  the extension

Returns:

- (`::VertxWeb::MVELTemplateEngine`) —
  a reference to this for fluency

Raises:

- (`ArgumentError`)

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

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

### - (`::VertxWeb::MVELTemplateEngine`) set_max_cache_size(maxCacheSize = nil)

Set the max cache size for the engine

Parameters:

- maxCacheSize (`Fixnum`) (defaults to: `nil`) —
  the maxCacheSize

Returns:

- (`::VertxWeb::MVELTemplateEngine`) —
  a reference to this for fluency

Raises:

- (`ArgumentError`)

    38
    39
    40
    41
    42
    43
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/mvel_template_engine.rb', line 38

    def set_max_cache_size(maxCacheSize=nil)
      if maxCacheSize.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:setMaxCacheSize, [Java::int.java_class]).call(maxCacheSize),::VertxWeb::MVELTemplateEngine)
      end
      raise ArgumentError, "Invalid arguments when calling set_max_cache_size(maxCacheSize)"
    end