Sha256: 58db99525b99c1db9832c2869225d7edb3d33d1a81f8de7b0c0effdbfa43a9c7
Contents?: true
Size: 471 Bytes
Versions: 34
Compression:
Stored size: 471 Bytes
Contents
module Stove class Mash < ::Hash def method_missing(m, *args, &block) if has_key?(m.to_sym) self[m.to_sym] elsif has_key?(m.to_s) self[m.to_s] else super end end def methods(include_private = false) super + self.keys.map(&:to_sym) end def respond_to?(m, include_private = false) if has_key?(m.to_sym) || has_key?(m.to_s) true else super end end end end
Version data entries
34 entries across 34 versions & 3 rubygems