Sha256: ed7b5deda0c29a943d19a139162420200c87139729380cce8fe9636209d5ef42

Contents?: true

Size: 236 Bytes

Versions: 1

Compression:

Stored size: 236 Bytes

Contents

require 'bundler/setup'
require 'array_hasher'

f = ArrayHasher.new_formatter([
  [:a, :int], [:b, :float], [:c, proc { |v| v.split(',') }], [:d, nil, range: 3..-1]
])
puts f.parse(['number: 123', '$ 123.1', 'a,b,c', 'd1', 'd2', 'd3'])

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
array_hasher-0.1.5 examples/base.rb