Class: Guard::ReloadableSinatra

Inherits:
Plugin
  • Object
show all
Defined in:
lib/hippo/reloadable_sinatra.rb

Instance Method Summary collapse

Instance Method Details

#run_on_modifications(paths) ⇒ Object


13
14
15
16
# File 'lib/hippo/reloadable_sinatra.rb', line 13

def run_on_modifications(paths)
    @puma.stop
    @puma.start
end

#startObject


7
8
9
10
11
# File 'lib/hippo/reloadable_sinatra.rb', line 7

def start
    Hippo.logger.info "RELOADING WebServer"
    @puma = ::Hippo::Command::Puma.new
    @puma.start
end

#stopObject


18
19
20
# File 'lib/hippo/reloadable_sinatra.rb', line 18

def stop
    @puma.stop
end