Class: Jenkins2::ServiceUnavailableError
- Inherits:
-
Net::HTTPError
- Object
- Net::HTTPError
- Jenkins2::ServiceUnavailableError
- Defined in:
- lib/jenkins2/errors.rb
Instance Method Summary collapse
-
#initialize(res) ⇒ ServiceUnavailableError
constructor
A new instance of ServiceUnavailableError.
Constructor Details
#initialize(res) ⇒ ServiceUnavailableError
Returns a new instance of ServiceUnavailableError.
23 24 25 26 27 28 29 |
# File 'lib/jenkins2/errors.rb', line 23 def initialize(res) if res.body.nil? or res.body.empty? super('', res) else super(res.body.match('<h1[^>]*>\n\s+([^<]+)')[1], res) end end |