Class List Method List File List

# Class: VertxShell::Stream

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

## Instance Method Summary (collapse)

- - (Object) handle(event = nil)
- - (Stream) initialize(j_del) constructor
  A new instance of Stream.
- - (Object) j_del
- - (Object) write(data = nil)

## Constructor Details

### - (`Stream`) initialize(j_del)

Returns a new instance of Stream

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

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) handle(event = nil)

Raises:

- (`ArgumentError`)

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

    def handle(event=nil)
      if event.class == String && !block_given?
        return @j_del.java_method(:handle, [Java::java.lang.String.java_class]).call(event)
      end
      raise ArgumentError, "Invalid arguments when calling handle(event)"
    end

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

### - (`Object`) write(data = nil)

Raises:

- (`ArgumentError`)

    26
    27
    28
    29
    30
    31
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/stream.rb', line 26

    def write(data=nil)
      if data.class == String && !block_given?
        return @j_del.java_method(:write, [Java::java.lang.String.java_class]).call(data)
      end
      raise ArgumentError, "Invalid arguments when calling write(data)"
    end