Method: B2::UploadChunker#initialize
- Defined in:
- lib/b2/upload_chunker.rb
#initialize(data) ⇒ UploadChunker
Returns a new instance of UploadChunker.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/b2/upload_chunker.rb', line 5 def initialize(data) @data = data @sha_appended = false @digestor = Digest::SHA1.new @size = if data.is_a?(String) data.bytesize + 40 else data.size + 40 end end |