Exception: EventBright::Error

Inherits:
Exception
  • Object
show all
Defined in:
lib/eventbright/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, type = "", response = nil) ⇒ Error

Returns a new instance of Error.



4
5
6
7
8
9
# File 'lib/eventbright/error.rb', line 4

def initialize(message, type = "", response = nil)
  @type = type
  @response = response
  @message = message
  super(message)
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/eventbright/error.rb', line 3

def message
  @message
end

#responseObject

Returns the value of attribute response.



3
4
5
# File 'lib/eventbright/error.rb', line 3

def response
  @response
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/eventbright/error.rb', line 3

def type
  @type
end

Instance Method Details

#inspectObject



10
11
12
# File 'lib/eventbright/error.rb', line 10

def inspect
  "<EventBright::Error(#{type}): #{message}>"
end