Class: Adhearsion::ProtocolError
- Defined in:
- lib/adhearsion/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
- #eql?(other) ⇒ Boolean (also: #==)
- #setup(name = nil, text = nil, call_id = nil, component_id = nil) ⇒ Object
- #to_s ⇒ Object (also: #inspect)
Instance Attribute Details
#call_id ⇒ Object
Returns the value of attribute call_id.
9 10 11 |
# File 'lib/adhearsion/protocol_error.rb', line 9 def call_id @call_id end |
#component_id ⇒ Object
Returns the value of attribute component_id.
9 10 11 |
# File 'lib/adhearsion/protocol_error.rb', line 9 def component_id @component_id end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/adhearsion/protocol_error.rb', line 9 def name @name end |
#text ⇒ Object
Returns the value of attribute text.
9 10 11 |
# File 'lib/adhearsion/protocol_error.rb', line 9 def text @text end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
21 22 23 |
# File 'lib/adhearsion/protocol_error.rb', line 21 def eql?(other) other.is_a?(self.class) && [:name, :text, :call_id, :component_id].all? { |f| self.__send__(f) == other.__send__(f) } end |
#setup(name = nil, text = nil, call_id = nil, component_id = nil) ⇒ Object
11 12 13 14 |
# File 'lib/adhearsion/protocol_error.rb', line 11 def setup(name = nil, text = nil, call_id = nil, component_id = nil) @name, @text, @call_id, @component_id = name, text, call_id, component_id self end |
#to_s ⇒ Object Also known as: inspect
16 17 18 |
# File 'lib/adhearsion/protocol_error.rb', line 16 def to_s "#<#{self.class}: name=#{name.inspect} text=#{text.inspect} call_id=#{call_id.inspect} component_id=#{component_id.inspect}>" end |