title: Rails helper pass negative symbol as argument in self method
body: <p>In my Rails 6, Ruby 2.7 app I'm using <code>ActionView::Helpers::NumberHelper</code> and <code>number_to_currency</code> method. Everything works fine but in one place I need to have negative amount instead of positive. To do so I created two methods:</p>
  <p><code>formatters/document_amount_formatter.rb</code></p>
  <pre><code>module Formatters
    # Formats the amount in a suitable form to be used in PDF creator.
    class DocumentAmountFormatter
      extend ActionView::Helpers::NumberHelper
  
      # The method to call.
      #
      # @return [String]
      def self.call(amount)
        number_to_currency(amount.to_f, delimiter: '.', separator: ',', format: '%n €')
      end
  
      def self.negative_amount(amount)
        number_to_currency(-amount.to_f, delimiter: '.', separator: ',', format: '%n €')
      end
    end
  end
  </code></pre>
  <p>Both works well:</p>
  <pre><code>Formatters::CashbookDocumentAmountFormatter.call(cash_transactions.first.gross_amount)
  =&gt; &quot;100,00 €&quot;
  Formatters::CashbookDocumentAmountFormatter.negative_amount(cash_transactions.first.gross_amount)
  =&gt; &quot;-100,00 €&quot;
  </code></pre>
  <p>But I'm not so sure if this is a good approach, tbh the code seems to be smelly. Is it possible to change those two methods into one? How to pass '-' or '+' as an argument inside of one of these methods?</p>