Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Gem::Package::TarWriter#add_file_digest

add_file_digest(name, mode, digest_algorithms) { |io| ... }

Adds name with permissions mode to the tar, yielding io for writing the file. The digest_algorithm is written to a read-only name.sum file following the given file contents containing the digest name and hexdigest separated by a tab.

The created digest object is returned.

See also #add_file #add_file_signed .new #add_file_simple also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1