Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/sqlserver_schema_reflector/hash.rb
Instance Method Summary collapse
Instance Method Details
#find_hashes(keys) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/sqlserver_schema_reflector/hash.rb', line 8 def find_hashes(keys) h = symbolize_keys keys.each do |k| return nil unless h.keys.include? k end return h end |
#symbolize_keys ⇒ Object
2 3 4 5 6 7 |
# File 'lib/sqlserver_schema_reflector/hash.rb', line 2 def symbolize_keys inject({}) do |, (key, value)| [(key.underscore.downcase.to_sym rescue key) || key] = value end end |