Module: Crossroads

Defined in:
lib/crossroads.rb,
lib/crossroads/log.rb,
lib/crossroads/route.rb,
lib/crossroads/stomp.rb,
lib/crossroads/router.rb,
lib/crossroads/runner.rb

Defined Under Namespace

Classes: Log, Route, Router, Runner, Stomp

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.daemonizeObject



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/crossroads.rb', line 17

def self.daemonize
  fork do
    Process.setsid
    exit if fork
    Dir.chdir('/tmp')
    STDIN.reopen('/dev/null')
    STDOUT.reopen('/dev/null', 'a')
    STDERR.reopen('/dev/null', 'a')

    yield
  end
end

.runner(configfile) ⇒ Object



13
14
15
# File 'lib/crossroads.rb', line 13

def self.runner(configfile)
  Runner.new(configfile)
end

.versionObject



9
10
11
# File 'lib/crossroads.rb', line 9

def self.version
  VERSION
end