Class: Faye::Envelope
- Inherits:
-
Object
- Object
- Faye::Envelope
- Includes:
- Deferrable
- Defined in:
- lib/faye/protocol/envelope.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(message, timeout = nil) ⇒ Envelope
constructor
A new instance of Envelope.
Methods included from Deferrable
Constructor Details
#initialize(message, timeout = nil) ⇒ Envelope
Returns a new instance of Envelope.
7 8 9 10 11 12 |
# File 'lib/faye/protocol/envelope.rb', line 7 def initialize(, timeout = nil) @id = ['id'] @message = self.timeout(timeout, false) if timeout end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/faye/protocol/envelope.rb', line 5 def id @id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/faye/protocol/envelope.rb', line 5 def @message end |
Instance Method Details
#eql?(other) ⇒ Boolean
14 15 16 |
# File 'lib/faye/protocol/envelope.rb', line 14 def eql?(other) Envelope === other and @id == other.id end |
#hash ⇒ Object
18 19 20 |
# File 'lib/faye/protocol/envelope.rb', line 18 def hash @id.hash end |