class Bake::Command::Top
The top level command line application.
Public Instance Methods
bakefile_path()
click to toggle source
# File lib/bake/command/top.rb, line 66 def bakefile_path @options[:bakefile] || Dir.pwd end
call()
click to toggle source
# File lib/bake/command/top.rb, line 74 def call if @options[:help] self.print_usage else @command.call end end
context()
click to toggle source
# File lib/bake/command/top.rb, line 70 def context Context.load(self.bakefile_path) end
terminal(out = $stdout)
click to toggle source
# File lib/bake/command/top.rb, line 49 def terminal(out = $stdout) terminal = Console::Terminal.for(out) 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