Exception: Punchblock::DisconnectedError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/punchblock/disconnected_error.rb

Overview

This exception may be raised if the connection to the server is interrupted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cause = nil, message = nil) ⇒ DisconnectedError

Returns a new instance of DisconnectedError


9
10
11
# File 'lib/punchblock/disconnected_error.rb', line 9

def initialize(cause = nil, message = nil)
  @cause, @message = cause, message
end

Instance Attribute Details

#causeObject

Returns the value of attribute cause


7
8
9
# File 'lib/punchblock/disconnected_error.rb', line 7

def cause
  @cause
end

#messageObject

Returns the value of attribute message


7
8
9
# File 'lib/punchblock/disconnected_error.rb', line 7

def message
  @message
end

Instance Method Details

#to_sObject Also known as: inspect


13
14
15
# File 'lib/punchblock/disconnected_error.rb', line 13

def to_s
  "#<#{self.class}: cause=#{cause.inspect} message=#{message.inspect}"
end