Sha256: 2e8a4088c482406c5378e18aa49facc7aadd6f48a6e56005b00cc89e9def41af
Contents?: true
Size: 513 Bytes
Versions: 4
Compression:
Stored size: 513 Bytes
Contents
module RubyApp module Mixins module HashMixin def method_missing(name, *arguments) if name.to_s.match(/(.*)=/) capture = $~.captures[0] string = capture.to_s self[string] = arguments[0] if self.key?(string) symbol = capture.to_sym self[symbol] = arguments[0] unless self.key?(string) else self[name.to_s] || self[name.to_sym] end end end end end class Hash include RubyApp::Mixins::HashMixin end
Version data entries
4 entries across 4 versions & 1 rubygems