Class: Falcon::Command::Redirect
- Inherits:
 - 
      Samovar::Command
      
        
- Object
 - Samovar::Command
 - Falcon::Command::Redirect
 
 
- Includes:
 - Paths
 
- Defined in:
 - lib/falcon/command/redirect.rb
 
Instance Attribute Summary collapse
- 
  
    
      #paths  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
One or more paths to the configuration files.
 
Instance Method Summary collapse
- 
  
    
      #call  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Prepare the environment and run the controller.
 - 
  
    
      #container_class  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
The container class to use.
 - 
  
    
      #container_options  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Options for the container.
 - 
  
    
      #controller  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Prepare a new controller for the command.
 - 
  
    
      #endpoint(**options)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
The endpoint to bind to.
 - 
  
    
      #redirect_endpoint(**options)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
The template endpoint to redirect to.
 
Methods included from Paths
#configuration, #resolved_paths
Instance Attribute Details
#paths ⇒ Object (readonly)
One or more paths to the configuration files.
      45  | 
    
      # File 'lib/falcon/command/redirect.rb', line 45 many :paths  | 
  
Instance Method Details
#call ⇒ Object
Prepare the environment and run the controller.
      66 67 68 69 70 71 72 73 74 75  | 
    
      # 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 ⇒ Object
The container class to use.
      55 56 57  | 
    
      # File 'lib/falcon/command/redirect.rb', line 55 def container_class Async::Container.best_container_class end  | 
  
#container_options ⇒ Object
Options for the container. See Falcon::Controller::Serve#setup.
      61 62 63  | 
    
      # File 'lib/falcon/command/redirect.rb', line 61 def {} end  | 
  
#controller ⇒ Object
Prepare a new controller for the command.
      50 51 52  | 
    
      # File 'lib/falcon/command/redirect.rb', line 50 def controller Controller::Redirect.new(self) end  | 
  
#endpoint(**options) ⇒ Object
The endpoint to bind to.
      78 79 80  | 
    
      # File 'lib/falcon/command/redirect.rb', line 78 def endpoint(**) Async::HTTP::Endpoint.parse(@options[:bind], timeout: @options[:timeout], **) end  | 
  
#redirect_endpoint(**options) ⇒ Object
The template endpoint to redirect to.
      83 84 85  | 
    
      # File 'lib/falcon/command/redirect.rb', line 83 def redirect_endpoint(**) Async::HTTP::Endpoint.parse(@options[:redirect], **) end  |