Package org.jruby.RubyGlobal

Examples of org.jruby.RubyGlobal.InputGlobalVariable


        map.put(AttributeName.READER, reader);
        InputStream istream = new ReaderInputStream(reader);
        Ruby runtime = provider.getRuntime();
        RubyIO io = new RubyIO(runtime, istream);
        io.getOpenFile().getMainStream().setSync(true);
        runtime.defineVariable(new InputGlobalVariable(runtime, "$stdin", io));
        runtime.getObject().getConstantMapForWrite().put("STDIN", io);
    }
View Full Code Here


        map.put(AttributeName.READER, reader);
        InputStream istream = new ReaderInputStream(reader);
        Ruby runtime = provider.getRuntime();
        RubyIO io = new RubyIO(runtime, istream);
        io.getOpenFile().getMainStream().setSync(true);
        runtime.defineVariable(new InputGlobalVariable(runtime, "$stdin", io));
        runtime.getObject().storeConstant("STDIN", io);
    }
View Full Code Here

        map.put(AttributeName.READER, reader);
        InputStream istream = new ReaderInputStream(reader);
        Ruby runtime = provider.getRuntime();
        RubyIO io = new RubyIO(runtime, istream);
        io.getOpenFile().setSync(true);
        runtime.defineVariable(new InputGlobalVariable(runtime, "$stdin", io), GlobalVariable.Scope.GLOBAL);
        runtime.getObject().storeConstant("STDIN", io);
    }
View Full Code Here

TOP

Related Classes of org.jruby.RubyGlobal.InputGlobalVariable

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.