Package org.jruby

Examples of org.jruby.RubyHash.keys()


        File f = new File(directory + File.separator + string);

        runtime.loadFile(f, false);
        // runtime.loadFile(f, false);
        RubyHash rubyObject = (RubyHash) runtime.evalScript("init");
        for (Object s : rubyObject.keys().getList()) {
          System.out.println(s);
          map.put(s.toString(), rubyObject.get(s).toString());
        }
        // map.put(rubyObject.get(0).toString(), rubyObject.get(1)
        // .toString());
View Full Code Here


            IRubyObject value = RubyUtil.hashGet( headers, key );
            // if hash value
            if( JavaClass.assignable( value.getClass(), headers.getClass() ) )
            {
                RubyHash valueHash = (RubyHash)value;
                for( IRubyObject key1 : valueHash.keys().toJavaArray() )
                {
                    addHeader( key.toString(), RubyUtil.hashGet( valueHash, key1 ).toString() );
                }
            }
            else
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.