-
-
Save anonymous/3dc4a9bd1d53677708b2c11a688f6441 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Expected output | |
{ | |
name: "Jon", | |
wallets: { | |
"EUR": 868.65, | |
"USD": 463.69 | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
require 'json' | |
class WalletCentral | |
def self.output | |
file = File.open("./lib/resources/wallets.csv", "r") | |
data = file.read | |
CSV.parse(data).to_json | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Client | Currency | Amount | |
---|---|---|---|
jon | EUR | 868.65 | |
jon | USD | 463.39 | |
aray | EUR | 1379.78 | |
aray | USD | 1907.57 | |
sansa | EUR | 1065.45 | |
sansa | BRL | 586.28 | |
jaime | EUR | 1512.27 | |
jaime | USD | 1217.4 | |
tyrion | USD | 1068.12 | |
cersei | USD | 127.48 | |
cersei | EUR | 334.13 | |
bronn | EUR | 108.09 | |
bronn | BRL | 1341.58 | |
joffrey | BRL | 1323.87 | |
joffrey | EUR | 1645.04 | |
eddard | EUR | 779.36 | |
eddard | BRL | 106.82 | |
daario | EUR | 1233.6 | |
littlefinger | BRL | 1567.04 | |
littlefinger | USD | 908.9 |
havenwood
commented
Feb 14, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment