Class: ReactivePgClient::Json

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/json.rb

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)

16
17
18
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/json.rb', line 16

def @@j_api_type.accept?(obj)
  obj.class == Json
end

+ (::ReactivePgClient::Json) create(value = nil)

Parameters:

  • value (Object) (defaults to: nil)

Returns:

Raises:

  • (ArgumentError)

33
34
35
36
37
38
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/json.rb', line 33

def self.create(value=nil)
  if ::Vertx::Util::unknown_type.accept?(value) && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoReactiversePgclientData::Json.java_method(:create, [Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(value)),::ReactivePgClient::Json)
  end
  raise ArgumentError, "Invalid arguments when calling create(#{value})"
end

+ (Object) j_api_type


25
26
27
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/json.rb', line 25

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class


28
29
30
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/json.rb', line 28

def self.j_class
  Java::IoReactiversePgclientData::Json.java_class
end

+ (Object) unwrap(obj)


22
23
24
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/json.rb', line 22

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)


19
20
21
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/json.rb', line 19

def @@j_api_type.wrap(obj)
  Json.new(obj)
end

Instance Method Details

- (Object) value

Returns:

  • (Object)

Raises:

  • (ArgumentError)

40
41
42
43
44
45
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/json.rb', line 40

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