Class: VertxShell::CommandRegistration

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-shell/src/main/resources/vertx-shell/command_registration.rb

Overview

A registration of a command in the CommandRegistry

Instance Method Summary (collapse)

Instance Method Details

- (::VertxShell::Command) command

@return the registered command.

Returns:

Raises:

  • (ArgumentError)


22
23
24
25
26
27
# File '/Users/julien/java/vertx-aggregator/modules/vertx-shell/src/main/resources/vertx-shell/command_registration.rb', line 22

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

- (void) complete(completion = nil)

This method returns an undefined value.

Complete the command for the given completion.

Parameters:

Raises:

  • (ArgumentError)


31
32
33
34
35
36
# File '/Users/julien/java/vertx-aggregator/modules/vertx-shell/src/main/resources/vertx-shell/command_registration.rb', line 31

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

- (::VertxShell::Process) create_process(args = nil)

Create a new process with the passed arguments.

Parameters:

Returns:

Raises:

  • (ArgumentError)


40
41
42
43
44
45
# File '/Users/julien/java/vertx-aggregator/modules/vertx-shell/src/main/resources/vertx-shell/command_registration.rb', line 40

def create_process(args=nil)
  if args.class == Array && !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:createProcess, [Java::JavaUtil::List.java_class]).call(args.map { |element| element.j_del }),::VertxShell::Process)
  end
  raise ArgumentError, "Invalid arguments when calling create_process(args)"
end