Class: Money::Parser::Accounting
- Defined in:
- lib/money/parser/accounting.rb
Constant Summary
Constants inherited from Fuzzy
Fuzzy::CHINESE_NUMERIC_REGEX, Fuzzy::COMMA_DECIMAL_REGEX, Fuzzy::DOT_DECIMAL_REGEX, Fuzzy::ESCAPED_MARKS, Fuzzy::ESCAPED_NON_COMMA_MARKS, Fuzzy::ESCAPED_NON_DOT_MARKS, Fuzzy::ESCAPED_NON_SPACE_MARKS, Fuzzy::INDIAN_NUMERIC_REGEX, Fuzzy::MARKS, Fuzzy::NUMERIC_REGEX
Instance Method Summary collapse
Methods inherited from Fuzzy
Instance Method Details
#parse(input, currency = nil, **options) ⇒ Object
5 6 7 8 |
# File 'lib/money/parser/accounting.rb', line 5 def parse(input, currency = nil, **) # set () to mean negativity. ignore $ super(input.gsub(/\(\$?(.*?)\)/, '-\1'), currency, **) end |