Class: Qiniu::RS::UP::BlockProgressNotifier
- Inherits:
-
AbstractClass::BlockProgressNotifier
- Object
- AbstractClass::BlockProgressNotifier
- Qiniu::RS::UP::BlockProgressNotifier
- Defined in:
- lib/qiniu/rs/up.rb
Instance Attribute Summary collapse
-
#tmpdata ⇒ Object
readonly
Returns the value of attribute tmpdata.
Instance Method Summary collapse
-
#initialize(id) ⇒ BlockProgressNotifier
constructor
A new instance of BlockProgressNotifier.
- #notify(index, checksum) ⇒ Object
Constructor Details
#initialize(id) ⇒ BlockProgressNotifier
Returns a new instance of BlockProgressNotifier.
48 49 50 |
# File 'lib/qiniu/rs/up.rb', line 48 def initialize(id) @tmpdata = UP::TmpData.new(id, CHECKSUM_TMP_FILE) end |
Instance Attribute Details
#tmpdata ⇒ Object (readonly)
Returns the value of attribute tmpdata.
47 48 49 |
# File 'lib/qiniu/rs/up.rb', line 47 def tmpdata @tmpdata end |
Instance Method Details
#notify(index, checksum) ⇒ Object
51 52 53 54 55 |
# File 'lib/qiniu/rs/up.rb', line 51 def notify(index, checksum) @tmpdata.set(index, checksum) Utils.debug "block #{index}: {ctx: #{checksum}} successfully uploaded." Utils.debug "block #{index}: {checksum: #{checksum}} successfully uploaded." end |