Class: Bridgetown::Server

Inherits:
Rackup::Server
  • Object
show all
Defined in:
bridgetown-core/lib/bridgetown-core/commands/start.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



14
15
16
# File 'bridgetown-core/lib/bridgetown-core/commands/start.rb', line 14

def name
  server.to_s.split("::").last
end

#serveable?Boolean

Returns:

  • (Boolean)


22
23
24
25
26
27
# File 'bridgetown-core/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 'bridgetown-core/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

Returns:

  • (Boolean)


18
19
20
# File 'bridgetown-core/lib/bridgetown-core/commands/start.rb', line 18

def using_puma?
  name == "Puma"
end