Class: TFTP::ClientUploader
- Inherits:
-
Object
- Object
- TFTP::ClientUploader
- Defined in:
- lib/em-tftp.rb
Overview
Listeners
Instance Method Summary collapse
- #completed ⇒ Object
- #failed(error_msg) ⇒ Object
-
#initialize(&block) ⇒ ClientUploader
constructor
A new instance of ClientUploader.
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
#completed ⇒ Object
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 |