tracks/vendor/plugins/rspec/examples/pure/io_processor.rb

8 lines
204 B
Ruby

class DataTooShort < StandardError; end
class IoProcessor
# Does some fancy stuff unless the length of +io+ is shorter than 32
def process(io)
raise DataTooShort if io.read.length < 32
end
end