Class: Landline::Handlers::Link

Inherits:
Probe show all
Defined in:
lib/landline/probe/crosscall_handler.rb

Overview

Probe that sends files from a location

Instance Attribute Summary

Attributes inherited from Probe

#properties

Attributes inherited from Node

#remap, #root

Instance Method Summary collapse

Methods inherited from Node

#go, #reject

Constructor Details

#initialize(path, application, parent:) ⇒ Link

Returns a new instance of Link.

Parameters:



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

Parameters:

Returns:

  • (Array(Integer, Host{String => Object}, Object))


20
21
22
# File 'lib/landline/probe/crosscall_handler.rb', line 20

def process(request)
  throw :finish, @application.call(request.env)
end