Class: VertxShell::Command

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

Overview

A Vert.x Shell command, it can be created from any language using the VertxShell::CommandBuilder#command or from a Java class using #create

Instance Method Summary (collapse)

Instance Method Details

- (::Vertx::CLI) cli

@return the command line interface, can be null

Returns:

  • (::Vertx::CLI)

Raises:

  • (ArgumentError)


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

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

- (void) complete(completion = nil)

This method returns an undefined value.

Perform command completion, when the command is done completing it should call or )} method to signal completion is done.

Parameters:

Raises:

  • (ArgumentError)


49
50
51
52
53
54
# File '/Users/julien/java/vertx-aggregator/modules/vertx-shell/src/main/resources/vertx-shell/command.rb', line 49

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

- (String) name

@return the command name

Returns:

  • (String)

Raises:

  • (ArgumentError)


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

def name
  if !block_given?
    return @j_del.java_method(:name, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling name()"
end

- (void) process(process = nil)

This method returns an undefined value.

Process the command, when the command is done processing it should call the VertxShell::CommandProcess#end method.

Parameters:

Raises:

  • (ArgumentError)


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

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