Before

…lines 1–14 unchanged (14 lines)
15 def dump(object, options = {})
16 if options.delete(:pretty)
17 options.merge!({
18 indent: " ",
19 space: " ",
20 object_nl: "\n",
21 array_nl: "\n",
22 })
23 end
24
25 object.to_json(options)
26 end
27 end
28 end
29end
30

After

…lines 1–15 unchanged (15 lines)
16 if options.delete(:pretty)
17 options.merge!({
18 indent: " ",
19 space: " ",
20 object_nl: "\n",
21 array_nl: "\n"
22 })
23 end
24
25 object.to_json(options)
26 end
27 end
28 end
29end
30

Before

program
call
identifier "require"
argument_list
string
" "\""
string_content "multi_json/adapter"
" "\""
module
module "module"
constant "MultiJson"
body_statement
module
module "module"
constant "Adapters"
body_statement
class
class "class"
constant "JsonCommon"
superclass
< "<"
constant "Adapter"
body_statement
call
identifier "defaults"
argument_list
simple_symbol ":load"
, ","
pair
hash_key_symbol "create_additions"
: ":"
false "false"
, ","
pair
hash_key_symbol "quirks_mode"
: ":"
true "true"
method (+75 nodes collapsed)
method
def "def"
identifier "dump"
method_parameters
( "("
identifier "object"
, ","
optional_parameter
identifier "options"
= "="
hash
{ "{"
} "}"
) ")"
body_statement
if
if "if"
call
identifier "options"
. "."
identifier "delete"
argument_list
( "("
simple_symbol ":pretty"
) ")"
then
call
identifier "options"
. "."
identifier "merge!"
argument_list
( "("
hash
{ "{"
pair
hash_key_symbol "indent"
: ":"
string
" "\""
string_content " "
" "\""
, ","
pair
hash_key_symbol "space"
: ":"
string
" "\""
string_content " "
" "\""
, ","
pair
hash_key_symbol "object_nl"
: ":"
string
" "\""
escape_sequence "\\n"
" "\""
, ","
pair
hash_key_symbol "array_nl"
: ":"
string
" "\""
escape_sequence "\\n"
" "\""
, ","
} "}"
) ")"
end "end"
call
identifier "object"
. "."
identifier "to_json"
argument_list
( "("
identifier "options"
) ")"
end "end"
end "end"
end "end"
end "end"

After

program
call
identifier "require"
argument_list
string
" "\""
string_content "multi_json/adapter"
" "\""
module
module "module"
constant "MultiJson"
body_statement
module
module "module"
constant "Adapters"
body_statement
class
class "class"
constant "JsonCommon"
superclass
< "<"
constant "Adapter"
body_statement
call
identifier "defaults"
argument_list
simple_symbol ":load"
, ","
pair
hash_key_symbol "create_additions"
: ":"
false "false"
, ","
pair
hash_key_symbol "quirks_mode"
: ":"
true "true"
method (+75 nodes collapsed)
method
def "def"
identifier "dump"
method_parameters
( "("
identifier "object"
, ","
optional_parameter
identifier "options"
= "="
hash
{ "{"
} "}"
) ")"
body_statement
if
if "if"
call
identifier "options"
. "."
identifier "delete"
argument_list
( "("
simple_symbol ":pretty"
) ")"
then
call
identifier "options"
. "."
identifier "merge!"
argument_list
( "("
hash
{ "{"
pair
hash_key_symbol "indent"
: ":"
string
" "\""
string_content " "
" "\""
, ","
pair
hash_key_symbol "space"
: ":"
string
" "\""
string_content " "
" "\""
, ","
pair
hash_key_symbol "object_nl"
: ":"
string
" "\""
escape_sequence "\\n"
" "\""
, ","
pair
hash_key_symbol "array_nl"
: ":"
string
" "\""
escape_sequence "\\n"
" "\""
} "}"
) ")"
end "end"
call
identifier "object"
. "."
identifier "to_json"
argument_list
( "("
identifier "options"
) ")"
end "end"
end "end"
end "end"
end "end"