Hi all,

I've been playing with jruby for a while now, but there's one thing
that's stopped me using it more.

I'd like to wrap (a particular) java library to make it more ruby-ish
(-esque?), e.g. make things enumerable etc. However this is impractical
currently since the library is interface oriented, with factories etc.
Adding methods to the underlying implementation classes is a bad idea,
of course, and fragile.

So the request: can this be made to work?

[[
require "java"
include_class "java.util.List"
include_class "java.util.ArrayList"

class List
        def worked
                puts "WORKED"
        end
end

foo = ArrayList.new
foo.worked
]]

Thanks (and thanks for jruby generally)

Damian


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to