Class: Ccs::Uploader
- Inherits:
-
Object
- Object
- Ccs::Uploader
- Defined in:
- lib/ccs/uploader.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(uri, content, access_token, passphrase) ⇒ Uploader
constructor
A new instance of Uploader.
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
#call ⇒ Object
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 |