class HighLine::Menu
def init_help
action code, and the default help listing.
Initializes the help system by adding a :help choice, some
def init_help return if @items.include?(:help) topics = @help.keys.sort help_help = if @help.include?("help") @help["help"] else "This command will display helpful messages about " \ "functionality, like this one. To see the help for " \ "a specific topic enter:\n\thelp [TOPIC]\nTry asking " \ "for help on any of the following:\n\n" \ "<%= list(#{topics.inspect}, :columns_across) %>" end choice(:help, help_help) do |_command, topic| topic.strip! topic.downcase! if topic.empty? @highline.say(@help["help"]) else @highline.say("= #{topic}\n\n#{@help[topic]}") end end end