Exception: Punchblock::ProtocolError
- Inherits:
-
StandardError
- Object
- StandardError
- Punchblock::ProtocolError
- Defined in:
- lib/punchblock/protocol_error.rb
Overview
This exception may be raised if a transport error is detected.
Instance Attribute Summary collapse
-
#call_id ⇒ Object
Returns the value of attribute call_id.
-
#component_id ⇒ Object
Returns the value of attribute component_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(name = nil, text = nil, call_id = nil, component_id = nil) ⇒ ProtocolError
constructor
A new instance of ProtocolError.
- #to_s ⇒ Object (also: #inspect)
Constructor Details
#initialize(name = nil, text = nil, call_id = nil, component_id = nil) ⇒ ProtocolError
Returns a new instance of ProtocolError.
7 8 9 |
# File 'lib/punchblock/protocol_error.rb', line 7 def initialize(name = nil, text = nil, call_id = nil, component_id = nil) @name, @text, @call_id, @component_id = name, text, call_id, component_id end |
Instance Attribute Details
#call_id ⇒ Object
Returns the value of attribute call_id.
5 6 7 |
# File 'lib/punchblock/protocol_error.rb', line 5 def call_id @call_id end |
#component_id ⇒ Object
Returns the value of attribute component_id.
5 6 7 |
# File 'lib/punchblock/protocol_error.rb', line 5 def component_id @component_id end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/punchblock/protocol_error.rb', line 5 def name @name end |
#text ⇒ Object
Returns the value of attribute text.
5 6 7 |
# File 'lib/punchblock/protocol_error.rb', line 5 def text @text end |
Instance Method Details
#to_s ⇒ Object Also known as: inspect
11 12 13 |
# File 'lib/punchblock/protocol_error.rb', line 11 def to_s "#<#{self.class}: name=#{name.inspect} text=#{text.inspect} call_id=#{call_id.inspect} component_id=#{component_id.inspect}>" end |