Ruby - the simplest way to read a text file inside a zip file

ruby, zip

Solution

require 'zip/zip'

Zip::ZipFile.new("archive.zip").read("article.txt")

Problem

What is the simplest way to read a text file inside a zip file in Ruby? Something similar to PHP's `file_get_contents("zip://archive.zip#article.txt")`

Original source