Sha256: 157382fb89cdf60d72abca5ca0134527345a03792eaf0fe6c8a43b3d755e2c58
Contents?: true
Size: 622 Bytes
Versions: 125
Compression:
Stored size: 622 Bytes
Contents
module RubyApp module Mixins module HashMixin def method_missing(name, *arguments) if name.to_s.match(/(.*)=/) capture = $~.captures[0] self[capture.to_sym] = arguments[0] else return self[name.to_sym] end end end end end class Hash include RubyApp::Mixins::HashMixin def prepend!(key, value) self[key] = "#{value} #{self[key]}" end def symbolize! copy=self.dup self.clear copy.each do |name, value| value.symbolize! if value.is_a?(Hash) self[name.to_sym] = value end return self end end
Version data entries
125 entries across 125 versions & 1 rubygems