FlorianDoubletGi has quit [Ping timeout: 246 seconds]
vitae[m] has quit [Ping timeout: 246 seconds]
JesseChavezGitte has quit [Ping timeout: 246 seconds]
xardion has quit [Ping timeout: 272 seconds]
lc-thp[m] has joined #jruby
vitae[m] has joined #jruby
FlorianDoubletGi has joined #jruby
JesseChavezGitte has joined #jruby
xardion has joined #jruby
subbu|away is now known as subbu
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #jruby
Freeky is now known as Freaky
ur5us has quit [Ping timeout: 260 seconds]
<i8her8oat[m]>
Is there an <foo.is_a? klass> method but callable in java code on <IRubyObject> ?
<i8her8oat[m]>
just curious
<headius[m]>
I don't have the code in front of me but maybe kindOf?
ang-st has quit [Ping timeout: 240 seconds]
<i8her8oat[m]>
Exactly what I was looking for! However, there is one problem. I can't seem to find how to create a RubyClass or RubyModule instance from an already defined class in my ruby code and pass it as an argument. Do you have any ideas how I could do this?
<headius[m]>
Ah well it's not super obvious but there's a few ways
<headius[m]>
Simplest might be just evaluating SomeClass.new
<headius[m]>
Otherwise you can get the class object as a RubyClass and call newInstance
<headius[m]>
There nothing specific to do this in the embedding APIs sadly
<i8her8oat[m]>
Oops my bad I talked about getting an instance but I was actually thinking about something like <const_get('name')>
<headius[m]>
Oh you mean the class itself?
<i8her8oat[m]>
Yeah
<headius[m]>
Yeah again evaluating the full path toe the constant like "Foo::Bar" or I think some methods on org.jruby.Ruby
<headius[m]>
We try to encourage people to use the embedding apis but they don't always provide shortcuts for these things