Class: Jeff::Content

Inherits:
Struct
  • Object
show all
Defined in:
lib/jeff.rb

Overview

Calculates an MD5sum for file being uploaded.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



25
26
27
# File 'lib/jeff.rb', line 25

def body
  @body
end

Instance Method Details

#md5Object



26
27
28
# File 'lib/jeff.rb', line 26

def md5
  Base64.encode64(OpenSSL::Digest::MD5.digest(body)).strip
end