Class: BrowserChannel::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/browser_channel.rb

Overview

Example Handler that echos data.

Constant Summary collapse

REQ_REGEXP =
/^req(\d*)_(.*)$/

Instance Method Summary collapse

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

#terminateObject



59
60
# File 'lib/browser_channel.rb', line 59

def terminate
end