Method: Bake::Doc.show

Defined in:
lib/bake/options/showDoc.rb

.showObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/bake/options/showDoc.rb', line 8

def self.show
  if File.exist?(File.dirname(__FILE__)+"/../../../doc/index.html")
    link = File.expand_path(File.dirname(__FILE__)+"/../../../doc/index.html")
  else
    link = "http://esrlabs.github.io/bake"
  end

  if RUBY_PLATFORM =~ /mswin|mingw|cygwin/
    system "start #{link}"
  elsif RUBY_PLATFORM =~ /darwin/
    system "open #{link}"
  elsif RUBY_PLATFORM =~ /linux|bsd/
    system "xdg-open #{link}"
  else
    puts "Please open #{link} manually in your browser."
  end

  ExitHelper.exit(0)
end