Class List Method List File List

# Class: VertxShell::Session

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

## Class Method Summary (collapse)

- + (Object) create

## Instance Method Summary (collapse)

- - (Object) get(key = nil)
- - (Session) initialize(j_del) constructor
  A new instance of Session.
- - (Object) j_del
- - (Object) put(key = nil, obj = nil)
- - (Object) remove(key = nil)

## Constructor Details

### - (`Session`) initialize(j_del)

Returns a new instance of Session

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

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create

Raises:

- (`ArgumentError`)

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

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

## Instance Method Details

### - (`Object`) get(key = nil)

Raises:

- (`ArgumentError`)

    38
    39
    40
    41
    42
    43
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/session.rb', line 38

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

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

### - (`Object`) put(key = nil, obj = nil)

Raises:

- (`ArgumentError`)

    28
    29
    30
    31
    32
    33
    34
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/session.rb', line 28

    def put(key=nil,obj=nil)
      if key.class == String && (obj.class == String  || obj.class == Hash || obj.class == Array || obj.class == NilClass || obj.class == TrueClass || obj.class == FalseClass || obj.class == Fixnum || obj.class == Float) && !block_given?
        @j_del.java_method(:put, [Java::java.lang.String.java_class,Java::java.lang.Object.java_class]).call(key,::Vertx::Util::Utils.to_object(obj))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling put(key,obj)"
    end

### - (`Object`) remove(key = nil)

Raises:

- (`ArgumentError`)

    47
    48
    49
    50
    51
    52
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/session.rb', line 47

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