module PIM::AttributeTemplates::Decimal

Public Class Methods

format(value, attribute = nil) click to toggle source
# File pim.rb, line 5437
def self.format value, attribute = nil
  return nil if value.nil? or value.to_s.empty?
  return sprintf('%.15f', value).sub(/0+$/, '').sub(/\.$/, '.0')
end