module GreenHat::Web
Web
Helper
Public Class Methods
start()
click to toggle source
# File lib/greenhat/web.rb, line 19 def self.start @thread = Thread.new do # original_stderr = $stderr.clone # original_stdout = $stdout.clone # $stderr.reopen(File.new('/dev/null', 'w')) # $stdout.reopen(File.new('/dev/null', 'w')) app = MyApp.run! # $stdout.reopen(original_stdout) # $stderr.reopen(original_stderr) # $stdout.reopen($STDOUT_CLONE) app end sleep 0.2 end
stop()
click to toggle source
# File lib/greenhat/web.rb, line 42 def self.stop thread.kill if thread.alive? end
thread()
click to toggle source
# File lib/greenhat/web.rb, line 38 def self.thread @thread end