Class: Mushikago::Hanamgri::TrainRequest

Inherits:
Mushikago::Http::PostRequest show all
Defined in:
lib/mushikago/hanamgri/train_request.rb

Instance Attribute Summary collapse

Attributes inherited from Mushikago::Http::Request

#headers, #host, #params, #port

Instance Method Summary collapse

Methods inherited from Mushikago::Http::PostRequest

#http_method

Methods included from Auth::Signature

#add_signature!, #string_to_sign

Methods inherited from Mushikago::Http::Request

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

Constructor Details

#initialize(domain_name, url_or_html, training_data, options = {}) ⇒ TrainRequest

Returns a new instance of TrainRequest.



11
12
13
14
15
16
17
18
# File 'lib/mushikago/hanamgri/train_request.rb', line 11

def initialize domain_name, url_or_html, training_data, options={}
  super(options)
  raise unless training_data.kind_of? Mushikago::Hanamgri::TrainingData
  self.domain_name = domain_name
  self.url_or_html = url_or_html
  self.training_data = training_data
  self.charset = options[:charset] if options.has_key?(:charset)
end

Instance Attribute Details

#domain_nameObject

Returns the value of attribute domain_name.



6
7
8
# File 'lib/mushikago/hanamgri/train_request.rb', line 6

def domain_name
  @domain_name
end

Instance Method Details

#pathObject



5
# File 'lib/mushikago/hanamgri/train_request.rb', line 5

def path; "/1/hanamgri/domains/#{domain_name}/train" end