Sha256: 5c7d9e2a69166da0df0c24e3074b5fca2a4fc56bc3444fcb898f52a895c64f75
Contents?: true
Size: 662 Bytes
Versions: 13
Compression:
Stored size: 662 Bytes
Contents
module EfoNelfo module PropertyTypes refine NilClass do def to_csv nil end end refine TrueClass do def to_csv 'J' end end refine FalseClass do def to_csv 'N' end end refine String do def to_csv to_s.encode EfoNelfo::Reader::CSV::ENCODING end end refine Date do def to_csv strftime("%Y%m%d") end end refine Fixnum do def to_csv to_s end end refine Float do def with_decimals(decimals) decimals.nil? ? self : self * (1.0/10**decimals.to_i) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems