Skip to content

Commit 84db6df

Browse files
committed
Simplify currency computation from ISO code by directly returning the Money::Currency.find result
1 parent e0e0d7d commit 84db6df

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/monetize/parser.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,7 @@ def parse_currency
112112
end
113113

114114
def compute_currency_from_iso_code
115-
computed_currency = input[/[A-Z]{2,3}/]
116-
117-
return unless Money::Currency.find(computed_currency)
118-
119-
computed_currency
115+
Money::Currency.find(input[/[A-Z]{2,3}/])
120116
end
121117

122118
def compute_currency_from_symbol

0 commit comments

Comments
 (0)