Skip to content

Commit b64c95d

Browse files
committed
Simplify currency computation from ISO code by directly returning the Money::Currency.find result
1 parent 72a6d4f commit b64c95d

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

lib/monetize/parser.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,7 @@ def parse_currency
119119
end
120120

121121
def compute_currency_from_iso_code
122-
computed_currency = input[/[A-Z]{2,3}/]
123-
124-
return unless Money::Currency.find(computed_currency)
125-
126-
computed_currency
122+
Money::Currency.find(input[/[A-Z]{2,3}/])
127123
end
128124

129125
def compute_currency_from_symbol

0 commit comments

Comments
 (0)