Sha256: 526dcb3daba82118ff95249575bfc92b17b9c718d1eb578e4e995b131f4b8ae8

Contents?: true

Size: 260 Bytes

Versions: 4

Compression:

Stored size: 260 Bytes

Contents

= CastingHash

A CastingHash is a Hash that allows _casting_ procedures to
defined that the keys and values pass through upon assignment.

  c = CastingHash.new
  c.cast_proc = lambda { |k,v| [k.to_s, v.to_s.upcase] }

  c[:a] = 'a'

  c.assert == {'a'=>'A'}

Version data entries

4 entries across 3 versions & 2 rubygems

Version Path
embulk-input-druginfo_interview_form-0.1.0 vendor/bundle/ruby/2.4.0/gems/hashery-2.1.2/demo/03_casting_hash.rdoc
embulk-input-druginfo_interview_form-0.1.0 vendor/bundle/ruby/2.5.0/gems/hashery-2.1.2/demo/03_casting_hash.rdoc
hashery-2.1.2 demo/03_casting_hash.rdoc
hashery-2.1.1 demo/03_casting_hash.rdoc