Class: Servel::CLI
- Inherits:
-
Object
- Object
- Servel::CLI
- Defined in:
- lib/servel/cli.rb
Constant Summary collapse
- ALLOWED_PUMA_OPTIONS =
[ :Host, :Port, :binds ]
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #start ⇒ Object
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
8 9 10 |
# File 'lib/servel/cli.rb', line 8 def initialize @config = Servel::ConfigParser.new.config end |
Instance Method Details
#start ⇒ Object
12 13 14 15 |
# File 'lib/servel/cli.rb', line 12 def start app = Servel.build_app(**@config.slice(:listings, :username, :password)) Rack::Handler::Puma.run(app, **@config.slice(*ALLOWED_PUMA_OPTIONS)) end |