class Spoonerize::Web::Cli
Command-line launcher for the web app.
Constants
- DEFAULT_OPTIONS
-
Server options used when no command-line overrides are passed.
@return [Hash]
Attributes
Parsed server options.
@return [Hash]
Public Class Methods
Source
# File lib/spoonerize/web/cli.rb, line 27 def self.execute(options = []) new(options).execute end
Starts the web app from command-line arguments.
@param [Array] options
@return [nil]
Source
# File lib/spoonerize/web/cli.rb, line 43 def initialize(options) @options = DEFAULT_OPTIONS.merge(parse(options)) end
Create a web CLI launcher.
@param [Array] options Command-line arguments.
@return [self]
Public Instance Methods
Source
# File lib/spoonerize/web/cli.rb, line 51 def execute Web.run!(bind: options[:host], port: options[:port]) end
Starts the Sinatra web app.
@return [nil]