Module: JrubyCoercion

Defined in:
lib/jruby_coercion.rb,
lib/jruby_coercion/version.rb,
lib/jruby_coercion/coercable.rb,
lib/jruby_coercion/converter.rb

Defined Under Namespace

Modules: Coercable, RubyToJava Classes: Converter, Registry

Constant Summary collapse

VERSION =
"0.0.7"

Class Method Summary collapse

Class Method Details

.native_type?(java_type) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/jruby_coercion.rb', line 8

def self.native_type?(java_type)
  java_type.class == Java::JavaClass
end

.ruby_type?(java_type) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/jruby_coercion.rb', line 12

def self.ruby_type?(java_type)
  java_type.class == Class
end