final Map<String, String> map = new HashMap<String, String>();
// Get map of all fields we want to define.
for (int i = 0; i < args.length; i++) {
if (args[i] instanceof RubyHash) {
((RubyHash) args[i]).visitAll(new Visitor() {
@Override
public void visit(IRubyObject key, IRubyObject value) {
map.put(key.asString().toString(), value.asString().toString());
}
});