exceptions 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/exceptions/result.rb +12 -5
- data/lib/exceptions/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e22bde9b588254869a161c750b9e5f9407857d69
|
4
|
+
data.tar.gz: 39ce679d0cc456ca8cdc676e8885abf806f95b7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a66bc3bd68635ed142354ced7e2289790ea357b047fa90f37df7672008f4920e41d85be492b017108c8ff848188d70c9713c140d479210b8fb4a0c3f01180a6
|
7
|
+
data.tar.gz: b8e437c1c02bff288ef0c5c1991a4a11ef15612e106fe42911952b65108b8de1a3c93a61a07442941b82548fa94eddfa942ca37dc8b721c66507839818ec294f
|
data/lib/exceptions/result.rb
CHANGED
@@ -1,15 +1,22 @@
|
|
1
1
|
module Exceptions
|
2
|
-
# Public: Result represents
|
3
|
-
#
|
2
|
+
# Public: A Result represents the result of an exception notification. It's an object
|
3
|
+
# that conforms to the following interface:
|
4
|
+
#
|
5
|
+
# `id` - The exception id from the third party service.
|
6
|
+
# `url` - A URL to view the exception in the third party service.
|
7
|
+
# `ok?` - True if the exception was successfully shuttled.
|
8
|
+
#
|
9
|
+
# This class is mostly a reference implementation but anything that conforms to the
|
10
|
+
# above interface is acceptable to return.
|
4
11
|
class Result
|
5
12
|
attr_reader :id
|
6
13
|
|
7
|
-
def initialize(id)
|
14
|
+
def initialize(id = nil)
|
8
15
|
@id = id
|
9
16
|
end
|
10
17
|
|
11
18
|
def url
|
12
|
-
|
19
|
+
""
|
13
20
|
end
|
14
21
|
|
15
22
|
def ok?
|
@@ -18,7 +25,7 @@ module Exceptions
|
|
18
25
|
end
|
19
26
|
|
20
27
|
# Public: BadResult can be returned when there's a failure.
|
21
|
-
class BadResult
|
28
|
+
class BadResult < Result
|
22
29
|
def ok?
|
23
30
|
false
|
24
31
|
end
|
data/lib/exceptions/version.rb
CHANGED