Class: ToadHopper
Overview
Posts errors to the Hoptoad API
Defined Under Namespace
Classes: Response
Constant Summary collapse
- VERSION =
"0.9.3"
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#filters=(*filters) ⇒ Object
Sets patterns to
[FILTER]
out sensitive data such as/password/
,/email/
and/credit_card_number/
. -
#initialize(api_key) ⇒ ToadHopper
constructor
A new instance of ToadHopper.
-
#post!(error, options = {}, http_headers = {}) ⇒ Response
Posts an exception to hoptoad.
Constructor Details
#initialize(api_key) ⇒ ToadHopper
Returns a new instance of ToadHopper.
14 15 16 |
# File 'lib/toadhopper.rb', line 14 def initialize(api_key) @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
12 13 14 |
# File 'lib/toadhopper.rb', line 12 def api_key @api_key end |
Instance Method Details
#filters=(*filters) ⇒ Object
Sets patterns to [FILTER]
out sensitive data such as /password/
, /email/
and /credit_card_number/
19 20 21 |
# File 'lib/toadhopper.rb', line 19 def filters=(*filters) @filters = filters.flatten end |
#post!(error, options = {}, http_headers = {}) ⇒ Response
Posts an exception to hoptoad.
54 55 56 57 |
# File 'lib/toadhopper.rb', line 54 def post!(error, ={}, http_headers={}) [:notifier_name] ||= 'ToadHopper' post_document(document_for(error, ), {'X-Hoptoad-Client-Name' => [:notifier_name]}) end |