Class: Airbrake::CollectingSender
- Defined in:
- lib/airbrake/sender.rb
Constant Summary
Constants inherited from Sender
Sender::HEADERS, Sender::HTTP_ERRORS, Sender::JSON_API_URI, Sender::NOTICES_URI
Instance Attribute Summary collapse
Attributes inherited from Sender
#api_key, #host, #http_open_timeout, #http_read_timeout, #port, #project_id, #protocol, #proxy_host, #proxy_pass, #proxy_port, #proxy_user, #secure, #use_system_ssl_cert_chain
Instance Method Summary collapse
Methods inherited from Sender
Constructor Details
This class inherits a constructor from Airbrake::Sender
Instance Attribute Details
#last_notice_path ⇒ Object
190 191 192 |
# File 'lib/airbrake/sender.rb', line 190 def last_notice_path File.(File.join("..", "..", "..", "resources", "notice.xml"), __FILE__) end |
Instance Method Details
#last_notice ⇒ Object
186 187 188 |
# File 'lib/airbrake/sender.rb', line 186 def last_notice File.read last_notice_path end |
#send_to_airbrake(notice) ⇒ Object
194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/airbrake/sender.rb', line 194 def send_to_airbrake(notice) data = prepare_notice(notice) notices_file = File.open(last_notice_path, "w") do |file| file.puts data end super(notice) ensure notices_file.close if notices_file end |