Skip to content

Commit a7ebe46

Browse files
ono-maxhsbt
authored andcommitted
Add newline between end and def
1 parent 45b53dd commit a7ebe46

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tool/lib/test/unit.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,7 @@ def initialize(path)
933933
@is_first_obj = true
934934
write_new_line
935935
end
936+
936937
def write_object
937938
if @is_first_obj
938939
@is_first_obj = false
@@ -953,6 +954,7 @@ def write_object
953954
@indent_level -= 1
954955
@is_first_key_val = true
955956
end
957+
956958
def write_array(key)
957959
@indent_level += 1
958960
write_indent
@@ -961,6 +963,7 @@ def write_array(key)
961963
@file.write(" ", "[")
962964
write_new_line
963965
end
966+
964967
def write_key_value(key, value)
965968
if @is_first_key_val
966969
@is_first_key_val = false
@@ -974,28 +977,35 @@ def write_key_value(key, value)
974977
@file.write(" ")
975978
@file.write(to_json_str(value))
976979
end
980+
977981
def close
978982
close_array
979983
@indent_level -= 1
980984
write_new_line
981985
@file.write("}")
982986
end
987+
983988
private
984989
def to_json_str(obj)
985990
JSON.dump(obj)
986991
end
992+
987993
def write_indent
988994
@file.write(" " * 2 * @indent_level)
989995
end
996+
990997
def write_new_line
991998
@file.write("\n")
992999
end
1000+
9931001
def write_comma
9941002
@file.write(',')
9951003
end
1004+
9961005
def write_colon
9971006
@file.write(":")
9981007
end
1008+
9991009
def close_array
10001010
write_new_line
10011011
write_indent

0 commit comments

Comments
 (0)