Sha256: ed972cc8adfe1fe070dac962f7117e4e38410ae29bff41e056d09c9c6a6124d4

Contents?: true

Size: 486 Bytes

Versions: 2

Compression:

Stored size: 486 Bytes

Contents

require 'jruby_coercion'
require 'jruby_coercion/coercable'
require 'jruby_coercion/ruby_to_java/registry'

class String
  include ::JrubyCoercion::Coercable
end

# java.math.BigDecimal
::JrubyCoercion::RubyToJava::Registry.register_converter(String, java.math.BigDecimal) do |string|
  java.math.BigDecimal.new(string)
end

# java.math.BigInteger
::JrubyCoercion::RubyToJava::Registry.register_converter(String, java.math.BigInteger) do |string|
  java.math.BigInteger.new(string)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jruby_coercion-0.0.7-java lib/jruby_coercion/string.rb
jruby_coercion-0.0.6-java lib/jruby_coercion/string.rb