Sha256: 094027fdc953cd2ad74b1bd056ffa843fb26b77c58e9f7f458b6fd769c0c1919

Contents?: true

Size: 282 Bytes

Versions: 1

Compression:

Stored size: 282 Bytes

Contents

# Type good for configurations

class CleanHash
  class Strict < Indifferent
    def [] key
      _check_key_existance key
      super
    end

    private

    def _check_key_existance key
      raise ArgumentError.new('Key not found: %s' % key) unless key?(key)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
clean-hash-0.5.9 ./lib/clean-hash/types/strict_type.rb