class Falcon::Command::Redirect
Public Instance Methods
call()
click to toggle source
Prepare the environment and run the controller.
# File lib/falcon/command/redirect.rb, line 66 def call Console.logger.info(self) do |buffer| buffer.puts "Falcon Redirect v#{VERSION} taking flight!" buffer.puts "- Binding to: #{@options[:bind]}" buffer.puts "- To terminate: Ctrl-C or kill #{Process.pid}" buffer.puts "- To reload: kill -HUP #{Process.pid}" end self.controller.run end
container_class()
click to toggle source
The container class to use.
# File lib/falcon/command/redirect.rb, line 55 def container_class Async::Container.best_container_class end
container_options()
click to toggle source
Options for the container. See {Controller::Serve#setup}.
# File lib/falcon/command/redirect.rb, line 61 def container_options {} end
controller()
click to toggle source
Prepare a new controller for the command.
# File lib/falcon/command/redirect.rb, line 50 def controller Controller::Redirect.new(self) end
endpoint(**options)
click to toggle source
The endpoint to bind to.
# File lib/falcon/command/redirect.rb, line 78 def endpoint(**options) Async::HTTP::Endpoint.parse(@options[:bind], timeout: @options[:timeout], **options) end
redirect_endpoint(**options)
click to toggle source
The template endpoint to redirect to.
# File lib/falcon/command/redirect.rb, line 83 def redirect_endpoint(**options) Async::HTTP::Endpoint.parse(@options[:redirect], **options) end