class MockIO
Public Class Methods
new(data='', &block)
click to toggle source
Calls superclass method
# File lib/upload_progress/test/multipart_progress_testx.rb, line 92 def initialize(data='', &block) test_logger.debug("MockIO inializing data: #{data[0..20]}") @block = block super(data) end
Public Instance Methods
read(size)
click to toggle source
Calls superclass method
# File lib/upload_progress/test/multipart_progress_testx.rb, line 103 def read(size) test_logger.debug("MockIO getting data from super") data = super test_logger.debug("Calling read callback") @block.call test_logger.debug("Returning data: #{data.size}") data end
write(data)
click to toggle source
Calls superclass method
# File lib/upload_progress/test/multipart_progress_testx.rb, line 99 def write(data) test_logger.debug("MockIO write #{data.size} data: #{data[0..20]}") super end