Class: Mushikago::Hotaru::DictionaryPutRequest

Inherits:
Mushikago::Http::MultipartPutRequest show all
Defined in:
lib/mushikago/hotaru/dictionary_put_request.rb

Constant Summary

Constants inherited from Mushikago::Http::MultipartRequest

Mushikago::Http::MultipartRequest::CR, Mushikago::Http::MultipartRequest::EOL, Mushikago::Http::MultipartRequest::LF

Instance Attribute Summary

Attributes inherited from Mushikago::Http::Request

#headers, #host, #params, #port

Instance Method Summary collapse

Methods inherited from Mushikago::Http::MultipartPutRequest

#http_method

Methods included from Auth::Signature

#add_signature!, #string_to_sign

Methods inherited from Mushikago::Http::MultipartRequest

#multipart_body, #to_http_request

Methods inherited from Mushikago::Http::Request

#[], #[]=, add_param, #to_http_request, #url_encoded_params

Constructor Details

#initialize(file_or_file_name, options = {}) ⇒ DictionaryPutRequest

Returns a new instance of DictionaryPutRequest.



10
11
12
13
14
15
16
17
18
19
# File 'lib/mushikago/hotaru/dictionary_put_request.rb', line 10

def initialize file_or_file_name, options={}
  super(options)
  if(file_or_file_name.kind_of?(File))
    self.dictionary_file = file_or_file_name
  else
    self.dictionary_file = File.new(file_or_file_name.to_s)
  end
  self.dictionary_name = options[:dictionary_name] if options.has_key?(:dictionary_name)
  self.description = options[:description] if options.has_key?(:description)
end

Instance Method Details

#pathObject



5
# File 'lib/mushikago/hotaru/dictionary_put_request.rb', line 5

def path; '/1/hotaru/dictionary/put' end