module Javanator def Javanator::javafy def toString; to_s; end end end class Test include Javanator Javanator::javafy end t = Test.new t.toString