Module: ActiveSupport::Inflector

Defined in:
lib/jactive_support/constantize.rb

Instance Method Summary collapse

Instance Method Details

#constantize_with_jruby(camel_cased_word) ⇒ Object Also known as: constantize



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/jactive_support/constantize.rb', line 5

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