Sha256: 414cbbea70267d85db2c0d5428069365687180767feeeacf1e21966b9f88a0c3
Contents?: true
Size: 269 Bytes
Versions: 10
Compression:
Stored size: 269 Bytes
Contents
module Decanter module ValueParser class IntegerParser < Base REGEX = /(\d|[.])/ allow Fixnum parser do |name, val, options| val.is_a?(Float) ? val.to_i : val.scan(REGEX).join.try(:to_i) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems