Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/hash.rb
Instance Method Summary collapse
Instance Method Details
#to_graph_attributes ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/hash.rb', line 4 def to_graph_attributes self.map do |key, value| if value.is_a?(Hash) [key.to_s.to_graph_attribute, value.to_graph_attributes] else [key.to_s.to_graph_attribute, value] end end.to_h end |