Class: TFTP::ClientUploader

Inherits:
Object
  • Object
show all
Defined in:
lib/em-tftp.rb

Overview

Listeners

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ ClientUploader

Returns a new instance of ClientUploader.



368
369
370
# File 'lib/em-tftp.rb', line 368

def initialize(&block)
  @callback = block
end

Instance Method Details

#completedObject



371
372
373
# File 'lib/em-tftp.rb', line 371

def completed
  @callback.call(true, nil)
end

#failed(error_msg) ⇒ Object



374
375
376
# File 'lib/em-tftp.rb', line 374

def failed(error_msg)
  @callback.call(false, error_msg)
end