Sha256: d77ae6a4ea00be21256aa551ca83245ab49a33735e6f15b44a7ab566ff58e7c9

Contents?: true

Size: 385 Bytes

Versions: 4

Compression:

Stored size: 385 Bytes

Contents

= StaticHash

A StaticHash is simply a Hash that can only be assigned
once per key. Once assigned a subsequent attempt to assign
a value to the same key will raise an ArgumentError.

  h = StaticHash.new

  h["x"] = 1

  expect ArgumentError do
    h["x"] = 2
  end

The same error will be raised when using #update or #merge!.

  expect ArgumentError do
    h.update( "x"=>3 )
  end

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