Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/hash.rb

Instance Method Summary collapse

Instance Method Details

#to_graph_attributesObject



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