Class: AchClient::Helpers::DollarsToCents
- Inherits:
-
Object
- Object
- AchClient::Helpers::DollarsToCents
- Defined in:
- lib/ach_client/helpers/dollars_to_cents.rb
Overview
Turns dollars into cents
Class Method Summary collapse
Class Method Details
.dollars_to_cents(dollars) ⇒ Fixnum
Returns 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 |