Sha256: 6ec9024576d128a5a8930fa15dfd7a9e24de4286a96ad4be9466d45f4b532cbf
Contents?: true
Size: 730 Bytes
Versions: 46
Compression:
Stored size: 730 Bytes
Contents
# encoding: utf-8 module Punchblock ## # This exception may be raised if a transport error is detected. class ProtocolError < Error attr_accessor :name, :text, :call_id, :component_id 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 def to_s "#<#{self.class}: name=#{name.inspect} text=#{text.inspect} call_id=#{call_id.inspect} component_id=#{component_id.inspect}>" end alias :inspect :to_s def eql?(other) other.is_a?(self.class) && [:name, :text, :call_id, :component_id].all? { |f| self.__send__(f) == other.__send__(f) } end alias :== :eql? end end
Version data entries
46 entries across 46 versions & 1 rubygems