Class List Method List File List

# Class: VertxWeb::TemplateHandler

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

## Class Method Summary (collapse)

- + (Object) create(engine = nil, templateDirectory = nil, contentType = nil)

## Instance Method Summary (collapse)

- - (Object) handle(arg0 = nil)
- - (TemplateHandler) initialize(j_del) constructor
  A new instance of TemplateHandler.
- - (Object) j_del

## Constructor Details

### - (`TemplateHandler`) initialize(j_del)

Returns a new instance of TemplateHandler

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

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(engine = nil, templateDirectory = nil, contentType = nil)

Raises:

- (`ArgumentError`)

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

    def self.create(engine=nil,templateDirectory=nil,contentType=nil)
      if engine.class.method_defined?(:j_del) && !block_given? && templateDirectory == nil && contentType == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::TemplateHandler.java_method(:create, [Java::IoVertxExtWebTempl::TemplateEngine.java_class]).call(engine.j_del),::VertxWeb::TemplateHandler)
      elsif engine.class.method_defined?(:j_del) && templateDirectory.class == String && contentType.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::TemplateHandler.java_method(:create, [Java::IoVertxExtWebTempl::TemplateEngine.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(engine.j_del,templateDirectory,contentType),::VertxWeb::TemplateHandler)
      end
      raise ArgumentError, "Invalid arguments when calling create(engine,templateDirectory,contentType)"
    end

## Instance Method Details

### - (`Object`) handle(arg0 = nil)

Raises:

- (`ArgumentError`)

    22
    23
    24
    25
    26
    27
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/template_handler.rb', line 22

    def handle(arg0=nil)
      if arg0.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:handle, [Java::IoVertxExtWeb::RoutingContext.java_class]).call(arg0.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling handle(arg0)"
    end

### - (`Object`) j_del

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

    def j_del
      @j_del
    end