Sha256: 49d04473df5ea5a35b68ab19d2e70b629e778047e6f3c2d9b2e16f70b0cd4400

Contents?: true

Size: 531 Bytes

Versions: 4

Compression:

Stored size: 531 Bytes

Contents

module RunCodeRun
  module Commands
    extend self

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

  Available commands:

EOL
      help << RunCodeRun.all_commands.map {|c| "    #{c}"}.join("\n")
      ui.puts help
    end
    
    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
    
    private 
    
    def ui
      RunCodeRun.ui
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
runcoderun-0.3.0 lib/commands/commands.rb
runcoderun-0.2.2 lib/commands/commands.rb
runcoderun-0.2.1 lib/commands/commands.rb
runcoderun-gem-0.1.1 lib/commands/commands.rb