Module: RunCodeRun::Commands

Extended by:
Commands
Included in:
Commands
Defined in:
lib/commands/commands.rb

Instance Method Summary collapse

Instance Method Details

#helpObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/commands/commands.rb', line 5

def help
  help =<<EOL
Usage: runcoderun command <options>

  Available commands:

EOL
  help << RunCodeRun.all_commands.map {|c| "    #{c}"}.join("\n")
  ui.puts help
end

#open(*args) ⇒ Object



16
17
18
19
20
21
# File 'lib/commands/commands.rb', line 16

def open(*args)
  current_dir = Pathname.getwd.basename
  current_owner = RunCodeRun.guess_owner
  url = %[http://runcoderun.com/#{current_owner}/#{current_dir}]
  Launchy.open(url)
end