Class: Certmeister::Response
- Inherits:
-
Object
- Object
- Certmeister::Response
- Defined in:
- lib/certmeister/response.rb
Class Method Summary collapse
Instance Method Summary collapse
- #denied? ⇒ Boolean
- #error ⇒ Object
- #error? ⇒ Boolean
- #hit? ⇒ Boolean
-
#initialize(type, pem, error) ⇒ Response
constructor
A new instance of Response.
- #miss? ⇒ Boolean
- #pem ⇒ Object
Constructor Details
#initialize(type, pem, error) ⇒ Response
Returns a new instance of Response.
7 8 9 10 11 |
# File 'lib/certmeister/response.rb', line 7 def initialize(type, pem, error) @type = type @pem = pem @error = error end |
Class Method Details
.denied(message) ⇒ Object
45 46 47 |
# File 'lib/certmeister/response.rb', line 45 def self.denied() new(:denied, nil, ) end |
.error(message) ⇒ Object
49 50 51 |
# File 'lib/certmeister/response.rb', line 49 def self.error() new(:error, nil, ) end |
.hit(pem = :none) ⇒ Object
37 38 39 |
# File 'lib/certmeister/response.rb', line 37 def self.hit(pem = :none) new(:hit, pem, nil) end |
.miss ⇒ Object
41 42 43 |
# File 'lib/certmeister/response.rb', line 41 def self.miss new(:miss, nil, nil) end |
Instance Method Details
#denied? ⇒ Boolean
29 30 31 |
# File 'lib/certmeister/response.rb', line 29 def denied? @type == :denied end |
#error ⇒ Object
17 18 19 |
# File 'lib/certmeister/response.rb', line 17 def error @error end |
#error? ⇒ Boolean
33 34 35 |
# File 'lib/certmeister/response.rb', line 33 def error? @type == :error end |
#hit? ⇒ Boolean
21 22 23 |
# File 'lib/certmeister/response.rb', line 21 def hit? @type == :hit end |
#miss? ⇒ Boolean
25 26 27 |
# File 'lib/certmeister/response.rb', line 25 def miss? @type == :miss end |
#pem ⇒ Object
13 14 15 |
# File 'lib/certmeister/response.rb', line 13 def pem @pem end |