Sha256: 9a052bda5c8510d33abeee172c33359e4e5a64c79c56d1fd416d11f958fca853

Contents?: true

Size: 402 Bytes

Versions: 4

Compression:

Stored size: 402 Bytes

Contents

= QueryHash

A QueryHash is a Hash that provides open access much like an OpenHash, but it limits readers
to bang and query methods (i.e. method ending in `!` or `?`).

  q = QueryHash.new
  q.a = 1
  q.b = 2
  q.a?.assert == 1
  q.b?.assert == 2

By default keys are converted to strings.

  q.assert == { "a"=>1, "b"=>2 }

A QueryHash is compatible with Ruby's standard Hash in every other respect.

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/02_query_hash.rdoc
embulk-input-druginfo_interview_form-0.1.0 vendor/bundle/ruby/2.5.0/gems/hashery-2.1.2/demo/02_query_hash.rdoc
hashery-2.1.2 demo/02_query_hash.rdoc
hashery-2.1.1 demo/02_query_hash.rdoc