Module: Interpol::HashFetcher
- Included in:
- DefinitionFinder, Endpoint, EndpointDefinition
- Defined in:
- lib/interpol/endpoint.rb
Instance Method Summary collapse
-
#fetch_from(hash, key) ⇒ Object
Unfortunately, on JRuby 1.9, the error raised from Hash#fetch when the key is not found does not include the key itself :(. So we work around it here..
Instance Method Details
#fetch_from(hash, key) ⇒ Object
Unfortunately, on JRuby 1.9, the error raised from Hash#fetch when the key is not found does not include the key itself :(. So we work around it here.
31 32 33 34 35 |
# File 'lib/interpol/endpoint.rb', line 31 def fetch_from(hash, key) hash.fetch(key) do raise ArgumentError.new("key not found: #{key.inspect}") end end |