Class: Array

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

Overview

:nodoc:

Direct Known Subclasses

Buildr::Options::EnvArray

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.



175
176
177
# File 'lib/buildr/java/rjb.rb', line 175

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