class Badgify::ServiceError
Attributes
http_body[R]
http_status[R]
json_body[R]
message[R]
Public Class Methods
new(message = nil, http_status = nil, http_body = nil, json_body = nil)
click to toggle source
# File lib/badgify/errors/service_error.rb, line 8 def initialize(message = nil, http_status = nil, http_body = nil, json_body = nil) @message = message @http_status = http_status @http_body = http_body @json_body = json_body end
Public Instance Methods
to_s()
click to toggle source
# File lib/badgify/errors/service_error.rb, line 15 def to_s status_string = @http_status.nil? ? "" : "(Status #{@http_status}) " "#{status_string}#{@message}" end