Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/e9_crm/rails_extensions.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#cents ⇒ Object
45 46 47 |
# File 'lib/e9_crm/rails_extensions.rb', line 45 def cents self end |
#to_money(currency = nil) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/e9_crm/rails_extensions.rb', line 37 def to_money(currency = nil) if match /^$|[^\$\d\.\,]/ self else Money.parse(self, currency) end end |