Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/gexf/support.rb
Instance Method Summary collapse
Instance Method Details
#symbolize_graph_types ⇒ Object
13 14 15 16 17 |
# File 'lib/gexf/support.rb', line 13 def symbolize_graph_types hash = {} each { |k, v| hash[k] = delete(k).to_sym if GEXF::GRAPH_TYPES.include?(v.to_sym) } merge(hash) end |
#symbolize_keys ⇒ Object
7 8 9 10 11 |
# File 'lib/gexf/support.rb', line 7 def symbolize_keys hash = {} each { |k,v| hash[k.to_sym] = delete(k) } merge(hash) end |