Class List Method List File List

# Class: VertxShell::CommandBuilder

Inherits:
  Object
  - Object
  - VertxShell::CommandBuilder
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/command_builder.rb

## Class Method Summary (collapse)

- + (Object) command(param_1 = nil)

## Instance Method Summary (collapse)

- - (Object) build(vertx = nil)
- - (Object) completion_handler
- - (CommandBuilder) initialize(j_del) constructor
  A new instance of CommandBuilder.
- - (Object) j_del
- - (Object) process_handler

## Constructor Details

### - (`CommandBuilder`) initialize(j_del)

Returns a new instance of CommandBuilder

    13
    14
    15
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/command_builder.rb', line 13

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) command(param_1 = nil)

Raises:

- (`ArgumentError`)

    28
    29
    30
    31
    32
    33
    34
    35
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/command_builder.rb', line 28

    def self.command(param_1=nil)
      if param_1.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellCommand::CommandBuilder.java_method(:command, [Java::java.lang.String.java_class]).call(param_1),::VertxShell::CommandBuilder)
      elsif param_1.class.method_defined?(:j_del) && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellCommand::CommandBuilder.java_method(:command, [Java::IoVertxCoreCli::CLI.java_class]).call(param_1.j_del),::VertxShell::CommandBuilder)
      end
      raise ArgumentError, "Invalid arguments when calling command(param_1)"
    end

## Instance Method Details

### - (`Object`) build(vertx = nil)

Raises:

- (`ArgumentError`)

    60
    61
    62
    63
    64
    65
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/command_builder.rb', line 60

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

### - (`Object`) completion_handler

Raises:

- (`ArgumentError`)

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

    def completion_handler
      if block_given?
        @j_del.java_method(:completionHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxShell::Completion)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling completion_handler()"
    end

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

### - (`Object`) process_handler

Raises:

- (`ArgumentError`)

    39
    40
    41
    42
    43
    44
    45
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/command_builder.rb', line 39

    def process_handler
      if block_given?
        @j_del.java_method(:processHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxShell::CommandProcess)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling process_handler()"
    end