Class: Hash
Instance Method Summary
collapse
#method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class RubyApp::Mixins::HashMixin
Instance Method Details
#prepend!(key, value) ⇒ Object
25
26
27
|
# File 'lib/ruby_app/mixins/hash_mixin.rb', line 25
def prepend!(key, value)
self[key] = "#{value} #{self[key]}"
end
|
#symbolize! ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'lib/ruby_app/mixins/hash_mixin.rb', line 29
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
|