class Bake::Command::Top
The top level command line application.
def bakefile_path
def bakefile_path @options[:bakefile] || Dir.pwd end
def call
def call if @options[:help] self.print_usage else @command.call end end
def context
def context Context.load(self.bakefile_path) end
def terminal(output = self.output)
def terminal(output = self.output) terminal = Console::Terminal.for(output) terminal[:context] = terminal[:loader] = terminal.style(nil, nil, :bold) terminal[:command] = terminal.style(nil, nil, :bold) terminal[:description] = terminal.style(:blue) terminal[:key] = terminal[:opt] = terminal.style(:green) terminal[:req] = terminal.style(:red) terminal[:keyreq] = terminal.style(:red, nil, :bold) terminal[:keyrest] = terminal.style(:green) terminal[:parameter] = terminal[:opt] return terminal end