module Compass::Commands::HelpOptionsParser
Public Instance Methods
command_list(header, commands)
click to toggle source
# File lib/compass/commands/help.rb, line 37 def command_list(header, commands) list = "#{header}\n" commands.sort_by{|c| c.to_s}.each do |command| list << " * #{command}" if Compass::Commands[command].respond_to? :description list << "\t- #{Compass::Commands[command].description(command)}" end list << "\n" end list end
set_options(opts)
click to toggle source
Calls superclass method
# File lib/compass/commands/help.rb, line 4 def set_options(opts) banner = %Q{Usage: compass help [command] Description: The Compass Stylesheet Authoring Framework helps you build and maintain your stylesheets and makes it easy for you to use stylesheet libraries provided by others. Donating: Compass is charityware. If you find it useful please make a tax deductable donation: http://umdf.org/compass To get help on a particular command please specify the command. } primary_commands = Compass::Commands.all.select do |c| cmd = Compass::Commands[c] cmd.respond_to?(:primary) && cmd.primary end other_commands = Compass::Commands.all - primary_commands banner << command_list("Primary Commands:", primary_commands) banner << command_list("Other Commands:", other_commands) banner << "\nAvailable Frameworks & Patterns:\n\n" banner << Compass::Frameworks.pretty_print banner << "\nGlobal Options:\n" opts.banner = banner super end