Class List Method List File List

# Class: VertxWeb::HandlebarsTemplateEngine

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

## Class Method Summary (collapse)

- + (Object) create

## Instance Method Summary (collapse)

- - (HandlebarsTemplateEngine) initialize(j_del) constructor
  A new instance of HandlebarsTemplateEngine.
- - (Object) j_del
- - (Object) render(arg0 = nil, arg1 = nil)
- - (Object) set_extension(extension = nil)
- - (Object) set_max_cache_size(maxCacheSize = nil)

## Constructor Details

### - (`HandlebarsTemplateEngine`) initialize(j_del)

Returns a new instance of HandlebarsTemplateEngine

    11
    12
    13
    14
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/handlebars_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/handlebars_template_engine.rb', line 32

    def self.create
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebTempl::HandlebarsTemplateEngine.java_method(:create, []).call(),::VertxWeb::HandlebarsTemplateEngine)
      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/handlebars_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/handlebars_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_extension(extension = nil)

Raises:

- (`ArgumentError`)

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

    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::HandlebarsTemplateEngine)
      end
      raise ArgumentError, "Invalid arguments when calling set_extension(extension)"
    end

### - (`Object`) set_max_cache_size(maxCacheSize = nil)

Raises:

- (`ArgumentError`)

    50
    51
    52
    53
    54
    55
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/handlebars_template_engine.rb', line 50

    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::HandlebarsTemplateEngine)
      end
      raise ArgumentError, "Invalid arguments when calling set_max_cache_size(maxCacheSize)"
    end