Module: Graphable::InstanceMethods
- Defined in:
- lib/graphable.rb
Instance Method Summary collapse
Instance Method Details
#to_node ⇒ Object
77 78 79 80 81 82 |
# File 'lib/graphable.rb', line 77 def to_node attributes.to_hash.tap do |hash| hash.each { |k, v| hash.delete(k) if v.nil? || k.to_s =~ /_id$/ } #remove FKs and nil values hash[:type] = self.class.name end end |