Class: Exceptions::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/exceptions/result.rb

Overview

Public: A Result represents the result of an exception notification. It’s an object that conforms to the following interface:

`id`  - The exception id from the third party service.
`url` - A URL to view the exception in the third party service.
`ok?` - True if the exception was successfully shuttled.

This class is mostly a reference implementation but anything that conforms to the above interface is acceptable to return.

Direct Known Subclasses

Backends::Honeybadger::Result, BadResult

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id = nil) ⇒ Result

Returns a new instance of Result.



14
15
16
# File 'lib/exceptions/result.rb', line 14

def initialize(id = nil)
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



12
13
14
# File 'lib/exceptions/result.rb', line 12

def id
  @id
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/exceptions/result.rb', line 22

def ok?
  true
end

#urlObject



18
19
20
# File 'lib/exceptions/result.rb', line 18

def url
  ""
end