Class List Method List File List

# Class: VertxShell::CommandRegistration

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

## Instance Method Summary (collapse)

- - (Object) command
- - (CommandRegistration) initialize(j_del) constructor
  A new instance of CommandRegistration.
- - (Object) j_del
- - (Object) unregister

## Constructor Details

### - (`CommandRegistration`) initialize(j_del)

Returns a new instance of CommandRegistration

    9
    10
    11
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/command_registration.rb', line 9

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) command

Raises:

- (`ArgumentError`)

    19
    20
    21
    22
    23
    24
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/command_registration.rb', line 19

    def command
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getCommand, []).call(),::VertxShell::Command)
      end
      raise ArgumentError, "Invalid arguments when calling command()"
    end

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

### - (`Object`) unregister

Raises:

- (`ArgumentError`)

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

    def unregister
      if !block_given?
        return @j_del.java_method(:unregister, []).call()
      elsif block_given?
        return @j_del.java_method(:unregister, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling unregister()"
    end