Sha256: 01ec433eaa9f0e81bf60c01921d042de7aef0e74a4091f22eff4e4f49b231e42

Contents?: true

Size: 553 Bytes

Versions: 10

Compression:

Stored size: 553 Bytes

Contents

require 'active_support/inflector'

module ActiveSupport
  module Inflector
    def constantize_with_jruby(camel_cased_word)
      names = camel_cased_word.split('::')
      names.shift if names.empty? || names.first.empty?

      if names.first == "Java" && names.size == 3
        last = names.pop
        constantize_without_jruby(names.join('::')).__send__ last
      else
        constantize_without_jruby(camel_cased_word)
      end
    end
    alias :constantize_without_jruby :constantize
    alias :constantize :constantize_with_jruby
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
jactive_support-2.1.2 lib/jactive_support/constantize.rb
jactive_support-3.0.0 lib/jactive_support/constantize.rb
jactive_support-3.0.0.pre2 lib/jactive_support/constantize.rb
jactive_support-3.0.0.pre1 lib/jactive_support/constantize.rb
jactive_support-2.1.1 lib/jactive_support/constantize.rb
jactive_support-2.1.0 lib/jactive_support/constantize.rb
jactive_support-2.0.0 lib/jactive_support/constantize.rb
jactive_support-1.0.2 lib/jactive_support/constantize.rb
jactive_support-1.0.1-universal-java-1.6 lib/jactive_support/constantize.rb
jactive_support-1.0.0-universal-java-1.6 lib/jactive_support/constantize.rb