Class: Fixnum
- Defined in:
- lib/gci-class-extensions.rb,
lib/gci-class-extensions.rb
Instance Method Summary collapse
-
#round(precision) ⇒ Object
we ignore the precision and just return itself as a float, since Float#to_f accepts this parameter.
-
#to_date ⇒ Object
adding to_date on the FixNum class so we don’t have to do iseries date.to_s.to_date.to_s(:xx) to format an iseries date…
Instance Method Details
#round(precision) ⇒ Object
we ignore the precision and just return itself as a float, since Float#to_f accepts this parameter
80 81 82 |
# File 'lib/gci-class-extensions.rb', line 80 def round(precision) to_f end |
#to_date ⇒ Object
adding to_date on the FixNum class so we don’t have to do iseries date.to_s.to_date.to_s(:xx) to format an iseries date…
3 4 5 |
# File 'lib/gci-class-extensions.rb', line 3 def to_date self.to_s.valid_date? ? self.to_s.to_date : nil end |