Class List Method List File List

# Class: VertxShell::ProcessContext

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

## Overview

Allow a process to interact with its context during execution.

## Instance Method Summary (collapse)

- - (void) end(status = nil)
  End the process.
- - (::VertxShell::Session) session
  @return the shell session.
- - (::VertxShell::Tty) tty
  @return the tty assocated with this process.

## Instance Method Details

### - (`void`) end(status = nil)

This method returns an undefined value.

End the process.

Parameters:

- status (`Fixnum`) (defaults to: `nil`) —
  the termination status

Raises:

- (`ArgumentError`)

    37
    38
    39
    40
    41
    42
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-shell/src/main/resources/vertx-shell/process_context.rb', line 37

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

### - (`::VertxShell::Session`) session

@return the shell session

Returns:

- (`::VertxShell::Session`)

Raises:

- (`ArgumentError`)

    28
    29
    30
    31
    32
    33
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-shell/src/main/resources/vertx-shell/process_context.rb', line 28

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

### - (`::VertxShell::Tty`) tty

@return the tty assocated with this process

Returns:

- (`::VertxShell::Tty`)

Raises:

- (`ArgumentError`)

    20
    21
    22
    23
    24
    25
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-shell/src/main/resources/vertx-shell/process_context.rb', line 20

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