class Buildkiq::ZipReader
Public Class Methods
new(zip_io)
click to toggle source
# File lib/buildkiq/zip_reader.rb, line 5 def initialize(zip_io) @zip_io = zip_io end
Public Instance Methods
find_by() { |e| ... }
click to toggle source
# File lib/buildkiq/zip_reader.rb, line 14 def find_by Zip::File.open_buffer(@zip_io) do |zip| zip.each { |e| return e if yield(e) } end nil end
find_by_name(filename)
click to toggle source
# File lib/buildkiq/zip_reader.rb, line 9 def find_by_name(filename) entry = find_by { |e| e.name == filename } entry ? entry.get_input_stream : nil end