Class: Landline::Handlers::Link
- Defined in:
- lib/landline/probe/crosscall_handler.rb
Overview
Probe that sends files from a location
Instance Attribute Summary
Attributes inherited from Probe
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(path, application, parent:) ⇒ Link
constructor
A new instance of Link.
-
#process(request) ⇒ Array(Integer, Host{String => Object}, Object)
Method callback on successful request navigation.
Methods inherited from Node
Constructor Details
#initialize(path, application, parent:) ⇒ Link
Returns a new instance of Link.
11 12 13 14 |
# File 'lib/landline/probe/crosscall_handler.rb', line 11 def initialize(path, application, parent:) @application = application super(path, parent: parent, filepath: true) end |
Instance Method Details
#process(request) ⇒ Array(Integer, Host{String => Object}, Object)
Method callback on successful request navigation. Sends request over to another rack app, stripping the part of the path that was not navigated
20 21 22 |
# File 'lib/landline/probe/crosscall_handler.rb', line 20 def process(request) throw :finish, @application.call(request.env) end |