Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/wax_tasks/utils.rb
Overview
Monkey-patched Hash class
Instance Method Summary collapse
-
#normalize ⇒ Hash
Normalizes hash as itself for lunr indexing.
-
#symbolize_keys ⇒ Hash
Converts hash keys to symbols.
Instance Method Details
#normalize ⇒ Hash
Normalizes hash as itself for lunr indexing
172 173 174 |
# File 'lib/wax_tasks/utils.rb', line 172 def normalize self end |
#symbolize_keys ⇒ Hash
Converts hash keys to symbols
178 179 180 181 182 183 184 |
# File 'lib/wax_tasks/utils.rb', line 178 def symbolize_keys hash = self hash.clone.each_key do |key| hash[key.to_sym || key] = hash.delete(key) end hash end |