Class List Method List File List

# Class: VertxWeb::PebbleTemplateEngine

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

## Class Method Summary (collapse)

- + (Object) create(vertx = nil)

## Instance Method Summary (collapse)

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

## Constructor Details

### - (`PebbleTemplateEngine`) initialize(j_del)

Returns a new instance of PebbleTemplateEngine

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

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

## Class Method Details

### + (`Object`) create(vertx = nil)

Raises:

- (`ArgumentError`)

    34
    35
    36
    37
    38
    39
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/pebble_template_engine.rb', line 34

    def self.create(vertx=nil)
      if vertx.class.method_defined?(:j_del) && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebTempl::PebbleTemplateEngine.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxWeb::PebbleTemplateEngine)
      end
      raise ArgumentError, "Invalid arguments when calling create(vertx)"
    end

## Instance Method Details

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

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

Raises:

- (`ArgumentError`)

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

    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`)

    43
    44
    45
    46
    47
    48
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/pebble_template_engine.rb', line 43

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

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

Raises:

- (`ArgumentError`)

    52
    53
    54
    55
    56
    57
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/pebble_template_engine.rb', line 52

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