module Dokku::Command

Public Class Methods

commands() click to toggle source
# File lib/dokku/command.rb, line 15
def self.commands
  @@commands ||= {}
end
load() click to toggle source
# File lib/dokku/command.rb, line 9
def self.load
  Dir[File.join(File.dirname(__FILE__), "command", "*.rb")].each do |file|
    require file
  end
end
run(command, args=[]) click to toggle source
# File lib/dokku/command.rb, line 19
def self.run(command, args=[])
  begin
    command = const_get(command.capitalize)
  rescue
    error("Command not found")
    exit(1)
  end
  
  begin
    command.send(:run, args)
  # rescue
  #   raise CommandFailed
  end
end