module Qismo class ObjectifiedHash < Hash def method_missing(method, *args, &block) return super unless respond_to?(method) fetch(method.to_s) end def respond_to?(method_name, include_private = false) fetch(method_name.to_s) true rescue KeyError super(method_name, include_private) end def respond_to_missing?(method_name, include_private = false) fetch(method_name.to_s) true rescue KeyError super(method_name, include_private) end end end