Class: CodeSync::PrySessionServer
- Inherits:
-
Object
- Object
- CodeSync::PrySessionServer
- Defined in:
- lib/code_sync/pry_console.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ PrySessionServer
constructor
A new instance of PrySessionServer.
Constructor Details
#initialize(app, options = {}) ⇒ PrySessionServer
Returns a new instance of PrySessionServer.
10 11 12 |
# File 'lib/code_sync/pry_console.rb', line 10 def initialize(app, ={}) @app = app end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/code_sync/pry_console.rb', line 14 def call(env) request = Rack::Request.new(env) params = request.params return @app.call(env) unless request.post? && (authenticate(params,env) && params['code']) process(params['code']) end |