Class: BrowserChannel::Handler
- Inherits:
-
Object
- Object
- BrowserChannel::Handler
- Defined in:
- lib/browser_channel.rb
Overview
Example Handler that echos data.
Constant Summary collapse
- REQ_REGEXP =
/^req(\d*)_(.*)$/
Instance Method Summary collapse
- #call(post_data) ⇒ Object
-
#initialize(session) ⇒ Handler
constructor
A new instance of Handler.
- #terminate ⇒ Object
Constructor Details
#initialize(session) ⇒ Handler
Returns a new instance of Handler.
56 57 58 |
# File 'lib/browser_channel.rb', line 56 def initialize session @session = session end |
Instance Method Details
#call(post_data) ⇒ Object
61 62 63 64 |
# File 'lib/browser_channel.rb', line 61 def call post_data requests = decode_post_data post_data requests.each { |r| @session << [r] } end |
#terminate ⇒ Object
59 60 |
# File 'lib/browser_channel.rb', line 59 def terminate end |