diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fbc69e1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+coverage/index.html
\ No newline at end of file
diff --git a/coverage/.resultset.json b/coverage/.resultset.json
index e5b8b42..b5b1636 100644
--- a/coverage/.resultset.json
+++ b/coverage/.resultset.json
@@ -108,28 +108,39 @@
null,
1,
8,
- null,
8,
- 10,
- 10,
- 10,
null,
- 10,
8,
+ 6,
+ 6,
+ null,
null,
2,
null,
null,
+ 1,
+ 6,
+ 6,
+ 6,
+ 6,
null,
- 8,
+ null,
+ 1,
+ 6,
+ 6,
+ 4,
+ null,
+ 2,
+ null,
+ 0,
null,
null,
1,
- 10,
+ 6,
null,
null,
1,
- 20,
+ 12,
null,
null
]
@@ -262,13 +273,13 @@
1,
1,
1,
- 1,
+ 0,
null,
null,
1,
1,
1,
- 1,
+ 0,
null,
null,
null
@@ -297,6 +308,6 @@
]
}
},
- "timestamp": 1597394773
+ "timestamp": 1600176367
}
}
diff --git a/coverage/index.html b/coverage/index.html
index 0c01483..a09f375 100644
--- a/coverage/index.html
+++ b/coverage/index.html
@@ -14,7 +14,7 @@
reversed = sort_balanced(@history)
+ reversed = reverse_sort(@history)
def sort_balanced(history)
+ def reverse_sort(history)
@@ -816,18 +816,29 @@ printable_transactions = []
+
+
date = format_date(transaction)
+ readable_transaction = make_it_readable(transaction)
amount = format_money(transaction[:amount])
+ printable_transactions = add_table_lines(readable_transaction)
balance = format_money(transaction[:balance])
+ end
if transaction[:type] == 'deposit'
+ printable_statement += printable_transactions
printable_statement.push("#{date} || #{amount} || || #{balance}\n")
+ end
else
+
printable_statement.push("#{date} || || #{amount} || #{balance}\n")
+ def make_it_readable(transaction)
transaction[:date] = format_date(transaction)
+ end
+
+
+ transaction[:amount] = format_money(transaction[:amount])
transaction[:balance] = format_money(transaction[:balance])
+ end
+
+
+ transaction
end
+ def add_table_lines(readable_transaction)
+ printable_statement = []
+ if readable_transaction[:type] == 'deposit'
+ printable_statement.push("#{date} || #{amount} || || #{balance}\n")
+ else
+ printable_statement.push("#{date} || || #{amount} || #{balance}\n")
+ end
+