Sha256: 7a3ac0183bf09210c6cd299c7e72b7ad37efc89c086cf7513a45641f30ed41e0
Contents?: true
Size: 289 Bytes
Versions: 5
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
5 entries across 5 versions & 1 rubygems