[jruby-user] accessing fields from class

"Roderich T." <[email protected]> Tue, 03 Mar 2015 14:16:54 +0100
Newsgroups gmane.comp.lang.jruby.user
Message-ID <[email protected]>
Hello,
what is the correct usage of field_accessor and field_reader?

I am calling a java class in my project, that is originally written in
Ruby and has been transferred using "jrubyc --javac myclass.rb". In
myclass.rb I use attr_accessor.

attr_accessor does obviously not work in a java class file. So it is
recommended to use field_accessor or field_reader instead. But the
result is an error "NameError: cannot initialize Java class". So what is
the correct way to make a field accessible in java classes?

Thanks Roderich

-- 
Posted via http://www.ruby-forum.com/.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email