Class: HumanistErrors::RegexHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/humanist_errors/regex_hash.rb

Instance Method Summary collapse

Instance Method Details

#[](value) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/humanist_errors/regex_hash.rb', line 3

def [](value)
  detect(-> { :no_result }) do |k,v|
    if k =~ value
      return v
    end
  end
end