1

I want to overwrite some method when I instantiate a Java Object using ruby

when I use Java,the implement like this

Class name = new Class() {
    @overwrite
    public String method() {
    }
}

but I don't know how to implement like this in jruby when I use ruby to instantiate the instance.

halfelf
  • 9,737
  • 13
  • 54
  • 63
Yang Liu
  • 31
  • 1
  • 4
  • 1
    https://stackoverflow.com/questions/803020/redefining-a-single-ruby-method-on-a-single-instance-with-a-lambda – halfelf Dec 19 '17 at 02:51

0 Answers0