class HipChat::ServiceError
Attributes
response[RW]
Public Class Methods
new(msg, response: nil)
click to toggle source
# File lib/hipchat/errors.rb, line 5 def initialize(msg, response: nil) @response = response @msg = msg end
Public Instance Methods
message()
click to toggle source
# File lib/hipchat/errors.rb, line 10 def message if @response.respond_to? :body "#{@msg}:\nResponse: #{@response.body}" else @msg end end