Class: Reveal
- Inherits:
-
Object
- Object
- Reveal
- Defined in:
- lib/reveal.rb
Class Method Summary collapse
Class Method Details
.read(file_or_text) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/reveal.rb', line 3 def self.read(file_or_text) file = coerce_to_file(file_or_text) gzip_reader = Zlib::GzipReader.new(file ) unzipped_data = gzip_reader.readlines.join gzip_reader.close return unzipped_data rescue Zlib::GzipFile::Error => e file.rewind return file.readlines.join end |