lib/store/digest/object.rb
# Return the object as a hash. Omits the content by default.
# @param content [false, true] include the content if true
# @return [Hash] the object as a hash
Return the object as a hash. Omits the content by default.
Return the object as a hash . Omits the content by default .
def to_h content: false
    main = %i[content digests]
    main.shift unless content
    (main + MANDATORY + OPTIONAL + [:flags]).map do |k|
      [k, send(k).dup]
    end.to_h
  end
def to_h content : false main = %i[ content digests ] main . shift unless content ( main + MANDATORY + OPTIONAL + [ :flags ] ) . map do | k | [ k , send ( k ) . dup ] end . to_h end
Return the object as a hash.
Return the object as a hash .
the object as a hash
the object as a hash
Hash
content
include the content if true
include the content if true