Class: BadPigeon::StrictHash

Inherits:
Hash
  • Object
show all
Includes:
Assertions
Defined in:
lib/bad_pigeon/util/strict_hash.rb

Instance Method Summary collapse

Methods included from Assertions

extended, included

Instance Method Details

#[](key) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/bad_pigeon/util/strict_hash.rb', line 7

def [](key)
  if has_key?(key)
    super
  else
    assert("Missing hash key: #{key}")
    nil
  end
end