Package org.jruby

Examples of org.jruby.RubyHash.entrySet()


//                            }
//                        }
                        break;
                    case JRuby:
                        RubyHash oRuby = (RubyHash) engine.eval(defines + "\n" + script, context);
                        Iterator itruby = oRuby.entrySet().iterator();
                        while (itruby.hasNext()) {
                            Map.Entry pairs = (Map.Entry) itruby.next();
                            page.getResultItems().put(pairs.getKey().toString(), pairs.getValue());
                        }
                        break;
View Full Code Here


                ret = new String[hash.size()];
            }

            int i=0;
            if (hash != null) {
                for(Map.Entry<String, String> e : (Set<Map.Entry<String, String>>)hash.entrySet()) {
                    // if the key is nil, raise TypeError
                    if (e.getKey() == null) {
                        throw runtime.newTypeError(runtime.getNil(), runtime.getStructClass());
                    }
                    // ignore if the value is nil
View Full Code Here

      if (args.length == 1) {
        // we have a string or hash
        if (args[0] instanceof RubyHash) {
          RubyHash hash = (RubyHash)args[0];

          for (Object _entry : hash.entrySet()) {
            Entry<String, Object> entry = (Entry<String, Object>) _entry;
            argumentsHash.put(PostgresHelpers.stringify(entry.getKey()), PostgresHelpers.stringify(entry.getValue()));
          }
        } else if (args[0] instanceof RubyString) {
        String[] tokens = tokenizeString(args[0].asJavaString());
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.