Class: Hanami::CLI::Server Private
- Inherits:
-
Object
- Object
- Hanami::CLI::Server
- Defined in:
- lib/hanami/cli/server.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- RACK_FALLBACK_OPTIONS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ host: :Host, port: :Port }.freeze
- OVERRIDING_OPTIONS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ config: :config, debug: :debug, warn: :warn }.freeze
Instance Attribute Summary collapse
- #rack_server ⇒ Object readonly private
Class Method Summary collapse
- .rack_server_class ⇒ Object private
Instance Method Summary collapse
- #call(**options) ⇒ Object private
-
#initialize(rack_server: self.class.rack_server_class) ⇒ Server
constructor
private
A new instance of Server.
Constructor Details
#initialize(rack_server: self.class.rack_server_class) ⇒ Server
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Server.
43 44 45 |
# File 'lib/hanami/cli/server.rb', line 43 def initialize(rack_server: self.class.rack_server_class) @rack_server = rack_server end |
Instance Attribute Details
#rack_server ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/hanami/cli/server.rb', line 16 def rack_server @rack_server end |
Class Method Details
.rack_server_class ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 36 37 38 39 |
# File 'lib/hanami/cli/server.rb', line 33 def self.rack_server_class if defined?(Rackup::Server) Rackup::Server else Rack::Server end end |
Instance Method Details
#call(**options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
49 50 51 52 53 |
# File 'lib/hanami/cli/server.rb', line 49 def call(**) rack_server.start(Hash[ () + () ]) end |