Class: Bridgetown::Server
- Inherits:
-
Rackup::Server
- Object
- Rackup::Server
- Bridgetown::Server
- Defined in:
- lib/bridgetown-core/commands/start.rb
Instance Method Summary collapse
- #name ⇒ Object
- #serveable? ⇒ Boolean
- #start(after_stop_callback = nil) ⇒ Object
- #using_puma? ⇒ Boolean
Instance Method Details
#name ⇒ Object
14 15 16 |
# File 'lib/bridgetown-core/commands/start.rb', line 14 def name server.to_s.split("::").last end |
#serveable? ⇒ Boolean
22 23 24 25 26 27 |
# File 'lib/bridgetown-core/commands/start.rb', line 22 def serveable? server true rescue LoadError, NameError false end |
#start(after_stop_callback = nil) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/bridgetown-core/commands/start.rb', line 7 def start(after_stop_callback = nil) trap(:INT) { exit } super() ensure after_stop_callback&.call end |
#using_puma? ⇒ Boolean
18 19 20 |
# File 'lib/bridgetown-core/commands/start.rb', line 18 def using_puma? name == "Puma" end |