Module: ZipTricks::NullWriter

Defined in:
lib/zip_tricks/null_writer.rb

Overview

Used when you need to supply a destination IO for some write operations, but want to discard the data (like when estimating the size of a ZIP)

Class Method Summary collapse

Class Method Details

.<<(data) ⇒ self



7
# File 'lib/zip_tricks/null_writer.rb', line 7

def self.<<(data); self; end

.write(data) ⇒ Fixnum



11
# File 'lib/zip_tricks/null_writer.rb', line 11

def self.write(data); data.bytesize; end