Class: RedHatSupportLib::Brokers::Symptom

Inherits:
Broker
  • Object
show all
Defined in:
lib/brokers/symptom.rb

Instance Attribute Summary

Attributes inherited from Broker

#connection

Instance Method Summary collapse

Methods inherited from Broker

#get_id

Constructor Details

#initialize(connection) ⇒ Symptom

Returns a new instance of Symptom.



4
5
6
# File 'lib/brokers/symptom.rb', line 4

def initialize(connection)
  super
end

Instance Method Details

#diagnose_file(file_path) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/brokers/symptom.rb', line 8

def diagnose_file(file_path)

  File.open(file_path) do |file|
    headers = {:content_type => 'text/plain', :accept => :json}
    result = @connection.post("/rs/symptoms/extractor", file, headers)
  end
end