Method: Arango::Document#to_h
- Defined in:
- lib/Document.rb
#to_h ⇒ Object
TO HASH ===
112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/Document.rb', line 112 def to_h { "name": @body[:_key], "id": @body[:_id], "rev": @body[:_rev], "from": @body[:_from], "to": @body[:_to], "body": @body, "cache_name": @cache_name, "collection": @collection.name, "graph": @graph&.name }.delete_if{|k,v| v.nil?} end |