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

## Overview

A registration of a command in the CommandRegistry

## Instance Method Summary (collapse)

- - (::VertxShell::Command) command
  @return the registered command.
- - (void) unregister { ... }
  Unregister the current command.

## Instance Method Details

### - (`::VertxShell::Command`) command

@return the registered command.

Returns:

- (`::VertxShell::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

### - (`void`) unregister { ... }

This method returns an undefined value.

Unregister the current command

Yields:

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