Sha256: e3c55826e71e3e424db1bb62d88443cf8eb4325b1c434ee401c5558b1b96bc63
Contents?: true
Size: 289 Bytes
Versions: 1
Compression:
Stored size: 289 Bytes
Contents
f = ArrayHasher.new_formatter([ [:a, :int], [:b, :float], [:c, :my_arr], [:d, nil, range: 3..-1] ]) f.define_type(:my_arr) { |v| v.split(',').map(&:to_i) } # or # f.types[:my_arr] = proc {|v| v.split(',').map(&:to_i) } puts f.parse(['number: 123', '$ 123.1', '1,2,3', 'd1', 'd2', 'd3'])
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
array_hasher-0.1.5 | examples/custom_type.rb |