class ActiveStorage::Blob

def download(&block)

That'll use a lot of RAM for very large files. If a block is given, then the download is streamed and yielded in chunks.
Downloads the file associated with this blob. If no block is given, the entire file is read into memory and returned.
def download(&block)
  service.download key, &block
end