Exception: Streak::StreakError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/streak/streak_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, http_status = nil, http_body = nil) ⇒ StreakError

Returns a new instance of StreakError.



3
4
5
6
7
# File 'lib/streak/streak_error.rb', line 3

def initialize(message=nil, http_status=nil, http_body=nil)
  @message = message
  @http_status = http_status
  @http_body = http_body
end

Instance Method Details

#to_sObject



9
10
11
12
# File 'lib/streak/streak_error.rb', line 9

def to_s
  status_string = @http_status.nil? ? "" : "(Status #{@http_status}) "
  "#{status_string}#{@message}"
end