* @return the hash
*/
@JRubyMethod(alias = "to_hash")
public RubyHash to_h(ThreadContext context) {
Ruby runtime = context.getRuntime();
RubyHash result = RubyHash.newHash(runtime);
result.op_aset(context, runtime.newSymbol("indent"), indent_get(context));
result.op_aset(context, runtime.newSymbol("space"), space_get(context));
result.op_aset(context, runtime.newSymbol("space_before"), space_before_get(context));
result.op_aset(context, runtime.newSymbol("object_nl"), object_nl_get(context));
result.op_aset(context, runtime.newSymbol("array_nl"), array_nl_get(context));
result.op_aset(context, runtime.newSymbol("allow_nan"), allow_nan_p(context));
result.op_aset(context, runtime.newSymbol("ascii_only"), ascii_only_p(context));
result.op_aset(context, runtime.newSymbol("quirks_mode"), quirks_mode_p(context));
result.op_aset(context, runtime.newSymbol("max_nesting"), max_nesting_get(context));
result.op_aset(context, runtime.newSymbol("depth"), depth_get(context));
result.op_aset(context, runtime.newSymbol("buffer_initial_length"), buffer_initial_length_get(context));
for (String name: getInstanceVariableNameList()) {
result.op_aset(context, runtime.newSymbol(name.substring(1)), getInstanceVariables().getInstanceVariable(name));
}
return result;
}