Class: Mushikago::Mitsubachi::ResourceStoreRequest
- Inherits:
-
Http::MultipartPostRequest
- Object
- Http::Request
- Http::MultipartRequest
- Http::MultipartPostRequest
- Mushikago::Mitsubachi::ResourceStoreRequest
- Defined in:
- lib/mushikago/mitsubachi/resource_store_request.rb
Constant Summary
Constants inherited from Http::MultipartRequest
Http::MultipartRequest::CR, Http::MultipartRequest::EOL, Http::MultipartRequest::LF
Instance Attribute Summary
Attributes inherited from Http::Request
#headers, #host, #params, #port
Instance Method Summary collapse
-
#initialize(project_name, file_or_file_name, options = {}) ⇒ ResourceStoreRequest
constructor
A new instance of ResourceStoreRequest.
- #path ⇒ Object
Methods inherited from Http::MultipartPostRequest
Methods included from Auth::Signature
#add_signature!, #string_to_sign
Methods inherited from Http::MultipartRequest
#multipart_body, #to_http_request
Methods inherited from Http::Request
#[], #[]=, add_param, #to_http_request, #url_encoded_params
Constructor Details
#initialize(project_name, file_or_file_name, options = {}) ⇒ ResourceStoreRequest
Returns a new instance of ResourceStoreRequest.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/mushikago/mitsubachi/resource_store_request.rb', line 12 def initialize project_name, file_or_file_name, ={} super() self.project_name = project_name if(file_or_file_name.kind_of?(File)) self.file = file_or_file_name else self.file = File.new(file_or_file_name.to_s) end self.file_name = [:file_name] || file.path self.content_type = [:content_type] || MIME::Types.of(file.path).first.to_s self.public = [:public] end |
Instance Method Details
#path ⇒ Object
5 |
# File 'lib/mushikago/mitsubachi/resource_store_request.rb', line 5 def path; '/1/mitsubachi/resource/store' end |