Exception: Budurl::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/budurl/client.rb

Overview

This class encapsulates BudURL API errors into a usable form.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code) ⇒ Error

Returns a new instance of Error.



61
62
63
64
# File 'lib/budurl/client.rb', line 61

def initialize(message, code)
  @code = code
  super("#{code} - #{message}")
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



59
60
61
# File 'lib/budurl/client.rb', line 59

def code
  @code
end