Class: Array

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

Overview

TODO: Antwrap 0.7 requires this monkeypatch, have it fixed.

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.



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

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