class Megingiard::HashWrapper
Only reveal fetch and translates the Error Message
Public Class Methods
new(hash, error_class)
click to toggle source
# File lib/megingiard/hash_wrapper.rb, line 4 def initialize(hash, error_class) @hash = hash @error_class = error_class end
Public Instance Methods
fetch(name)
click to toggle source
# File lib/megingiard/hash_wrapper.rb, line 9 def fetch(name) @hash.fetch(name) rescue raise @error_class end