Class List Method List File List

# Class: VertxShell::Pty

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

## Class Method Summary (collapse)

- + (Object) create(terminalType = nil)

## Instance Method Summary (collapse)

- - (Pty) initialize(j_del) constructor
  A new instance of Pty.
- - (Object) j_del
- - (Object) set_size(width = nil, height = nil)
- - (Object) slave
- - (Object) stdout_handler
- - (Object) write(data = nil)

## Constructor Details

### - (`Pty`) initialize(j_del)

Returns a new instance of Pty

    10
    11
    12
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/pty.rb', line 10

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(terminalType = nil)

Raises:

- (`ArgumentError`)

    21
    22
    23
    24
    25
    26
    27
    28
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/pty.rb', line 21

    def self.create(terminalType=nil)
      if !block_given? && terminalType == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::Pty.java_method(:create, []).call(),::VertxShell::Pty)
      elsif terminalType.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::Pty.java_method(:create, [Java::java.lang.String.java_class]).call(terminalType),::VertxShell::Pty)
      end
      raise ArgumentError, "Invalid arguments when calling create(terminalType)"
    end

## Instance Method Details

### - (`Object`) j_del

    15
    16
    17
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/pty.rb', line 15

    def j_del
      @j_del
    end

### - (`Object`) set_size(width = nil, height = nil)

Raises:

- (`ArgumentError`)

    53
    54
    55
    56
    57
    58
    59
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/pty.rb', line 53

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

### - (`Object`) slave

Raises:

- (`ArgumentError`)

    61
    62
    63
    64
    65
    66
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/pty.rb', line 61

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

### - (`Object`) stdout_handler

Raises:

- (`ArgumentError`)

    32
    33
    34
    35
    36
    37
    38
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/pty.rb', line 32

    def stdout_handler
      if block_given?
        @j_del.java_method(:stdoutHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling stdout_handler()"
    end

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

Raises:

- (`ArgumentError`)

    42
    43
    44
    45
    46
    47
    48
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/pty.rb', line 42

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