Method: AchClient::Helpers::DollarsToCents.dollars_to_cents

Defined in:
lib/ach_client/helpers/dollars_to_cents.rb

.dollars_to_cents(dollars) ⇒ Fixnum

Returns cents.

Parameters:

  • dollars (Float | BigDecimal | Fixnum | Integer)

Returns:

  • (Fixnum)

    cents



10
11
12
# File 'lib/ach_client/helpers/dollars_to_cents.rb', line 10

def self.dollars_to_cents(dollars)
  (dollars.to_f.round(2) * 100).to_i
end