Class: Ccs::Uploader

Inherits:
Object
  • Object
show all
Defined in:
lib/ccs/uploader.rb

Instance Method Summary collapse

Constructor Details

#initialize(uri, content, access_token, passphrase) ⇒ Uploader

Returns a new instance of Uploader.



5
6
7
8
9
10
# File 'lib/ccs/uploader.rb', line 5

def initialize(uri, content, access_token, passphrase)
  @uri = uri
  @content = content
  @access_token = access_token
  @passphrase = passphrase
end

Instance Method Details

#callObject



12
13
14
15
# File 'lib/ccs/uploader.rb', line 12

def call
  request.body = { encrypted_content: encrypted_content }.to_json
  http.request(request).code.eql? '201'
end