class TFTP::ClientDownloader
Public Class Methods
new(&block)
click to toggle source
# File lib/em-tftp.rb, line 380 def initialize(&block) @callback = block @buffer = "" end
Public Instance Methods
completed()
click to toggle source
# File lib/em-tftp.rb, line 387 def completed @callback.call(true, @buffer) end
failed(error_msg)
click to toggle source
# File lib/em-tftp.rb, line 390 def failed(error_msg) @callback.call(false, error_msg) end
received_block(block)
click to toggle source
# File lib/em-tftp.rb, line 384 def received_block(block) @buffer << block end