Class: CheckResult
- Inherits:
-
Object
- Object
- CheckResult
- Defined in:
- lib/chillout/check_result.rb
Instance Method Summary collapse
- #has_problem_with_authorization? ⇒ Boolean
-
#initialize(response) ⇒ CheckResult
constructor
A new instance of CheckResult.
- #successful? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ CheckResult
Returns a new instance of CheckResult.
2 3 4 |
# File 'lib/chillout/check_result.rb', line 2 def initialize(response) @response = response end |
Instance Method Details
#has_problem_with_authorization? ⇒ Boolean
10 11 12 |
# File 'lib/chillout/check_result.rb', line 10 def @response.respond_to?(:code) && @response.code == "401" end |
#successful? ⇒ Boolean
6 7 8 |
# File 'lib/chillout/check_result.rb', line 6 def successful? @response.respond_to?(:code) && @response.code == "200" end |