Module: Saorin::Utility
- Defined in:
- lib/saorin/utility.rb
Class Method Summary collapse
Class Method Details
.extract_options!(args) ⇒ Object
4 5 6 |
# File 'lib/saorin/utility.rb', line 4 def (args) args.last.is_a?(::Hash) ? args.pop : {} end |
.symbolized_keys(hash) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/saorin/utility.rb', line 8 def symbolized_keys(hash) hash = hash.dup hash.keys.each do |key| if key.is_a?(::String) hash[key.to_sym] = hash.delete(key) end end hash end |