Exception: Chuckle::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/chuckle/error.rb

Constant Summary collapse

CURL_TIMEOUT =
28

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, response) ⇒ Error



7
8
9
10
# File 'lib/chuckle/error.rb', line 7

def initialize(msg, response)
  super(msg)
  self.response = response
end

Instance Attribute Details

#responseObject

Returns the value of attribute response.



5
6
7
# File 'lib/chuckle/error.rb', line 5

def response
  @response
end

Instance Method Details

#timeout?Boolean



12
13
14
# File 'lib/chuckle/error.rb', line 12

def timeout?
  response.curl_exit_code == CURL_TIMEOUT
end