Method: Glark::ZipFile#initialize
- Defined in:
- lib/glark/io/file/zip_file.rb
#initialize(fname, range, &blk) ⇒ ZipFile
Returns a new instance of ZipFile.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/glark/io/file/zip_file.rb', line 12 def initialize fname, range, &blk super fname, range # Same caveat as ZipFile. Given that this is a gem, I'm not sure if it is # installed with other package managers. So the require is down here, used # only if needed. begin require 'zip/zip' rescue LoadError => e msg = "error loading zip gem: #{e}\n" msg << "to install this dependency, run 'gem install rubyzip'" info "msg: #{msg}".color(:red) raise msg end end |