Class: Array

Inherits:
Object show all
Defined in:
lib/buildr/java/rjb.rb

Instance Method Summary collapse

Instance Method Details

#to_java(cls) ⇒ Object

Converts a Ruby array into a typed Java array, argument specifies the element type. This is necessary for JRuby and causes no harm on RJB.



151
152
153
# File 'lib/buildr/java/rjb.rb', line 151

def to_java(cls)
  map { |item| cls.new(item) }
end