Sha256: 161644523a292dde679b87cfee47af670a91243108a47b588645366c003c4928
Contents?: true
Size: 508 Bytes
Versions: 10
Compression:
Stored size: 508 Bytes
Contents
module ChartMogul class ChartMogulError < StandardError attr_accessor :message attr_accessor :response attr_accessor :http_status def initialize(message, http_status:nil, response:nil) @message = message @http_status = http_status @response = response end def to_s status = @http_status ? " (HTTP Status: #{@http_status.to_s})" : '' response = @response ? "\nResponse: #{@response.to_s}" : '' "#{message}#{status}#{response}" end end end
Version data entries
10 entries across 10 versions & 1 rubygems