Package org.jruby.runtime.callback

Examples of org.jruby.runtime.callback.Callback


                RUBY_CLASS_NAME, superClass, CONNECTION_ALLOCATOR);
        connectionClass.defineAnnotatedMethods(Connection.class);
        setDriverDefinition(connectionClass, runtime, driver);

        if (driver.supportsConnectionEncodings()) {
            connectionClass.defineFastMethod("character_set", new Callback() {
                public Arity getArity() {
                    return Arity.NO_ARGUMENTS;
                }
                public IRubyObject execute(final IRubyObject recv, final IRubyObject[] args, Block block) {
                    return recv.getInstanceVariables().fastGetInstanceVariable("@encoding");
View Full Code Here


                    writeEncoding = enc.getInternalEncoding();
                }
            }
        }
        if (realIo.respondsTo("path")) {
            obj.getSingletonClass().defineMethod("path", new Callback() {

                public IRubyObject execute(IRubyObject recv, IRubyObject[] args, Block block) {
                    return ((JZlibRubyGzipReader) recv).realIo.callMethod(recv.getRuntime().getCurrentContext(), "path");
                }
View Full Code Here

TOP

Related Classes of org.jruby.runtime.callback.Callback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.