Class: Colossus::SimpleWriterServer::FayeClientExtension
- Inherits:
-
Object
- Object
- Colossus::SimpleWriterServer::FayeClientExtension
- Defined in:
- lib/colossus/simple_writer_server.rb
Instance Attribute Summary collapse
-
#writer_token ⇒ Object
Returns the value of attribute writer_token.
Instance Method Summary collapse
- #incoming(message, callback) ⇒ Object
-
#initialize(writer_token = nil) ⇒ FayeClientExtension
constructor
A new instance of FayeClientExtension.
- #outgoing(message, callback) ⇒ Object
Constructor Details
#initialize(writer_token = nil) ⇒ FayeClientExtension
Returns a new instance of FayeClientExtension.
55 56 57 |
# File 'lib/colossus/simple_writer_server.rb', line 55 def initialize(writer_token = nil) @writer_token = writer_token end |
Instance Attribute Details
#writer_token ⇒ Object
Returns the value of attribute writer_token.
53 54 55 |
# File 'lib/colossus/simple_writer_server.rb', line 53 def writer_token @writer_token end |
Instance Method Details
#incoming(message, callback) ⇒ Object
59 60 61 |
# File 'lib/colossus/simple_writer_server.rb', line 59 def incoming(, callback) callback.call() end |
#outgoing(message, callback) ⇒ Object
63 64 65 66 67 68 |
# File 'lib/colossus/simple_writer_server.rb', line 63 def outgoing(, callback) ['ext'] ||= {} ['ext']['writer_token'] = writer_token callback.call() end |