Module: Nirvana

Defined in:
lib/nirvana.rb,
lib/nirvana/util.rb,
lib/nirvana/shell.rb,
lib/nirvana/runner.rb,
lib/nirvana/version.rb,
lib/nirvana/websocket.rb

Defined Under Namespace

Modules: Shell, Util, Websocket Classes: Runner

Constant Summary collapse

VERSION =
'0.1.1'

Class Method Summary collapse

Class Method Details

.startObject



9
10
11
12
13
14
15
16
17
# File 'lib/nirvana.rb', line 9

def self.start
  if Runner::EXIT_OPTIONS.include? ARGV[0]
    Nirvana::Runner.run ARGV
  else
    system %[nirvana-websocket #{ARGV.join(' ')} &]
    html_file = File.expand_path(File.dirname(__FILE__) + '/nirvana/public/index.html')
    RUBY_PLATFORM[/darwin/i]  ? system('open', html_file) : puts(html_file)
  end
end