JRuby Script

I'm looking for an example JRuby, Groovy, or Jython script to navigate an instance object and return the value of a slot. This relates to the primitive property variation point that has THIS passed in as an argument. Except for velocity, I'm a bit frustrated at the lack of documentation on the subject of writing scripts.