Sha256: 7b5044a1288e3d2a77dd6b7969e2349541146c1dbec927a37d90caaabae78896
Contents?: true
Size: 847 Bytes
Versions: 60
Compression:
Stored size: 847 Bytes
Contents
require 'commands/meta/command' module Nutella class Help < Command @description = 'Displays what every command does and how to use it' def run(args=nil) message='' Dir["#{File.dirname(__FILE__)}/*.rb"].each do |file| message += add_cmd_help(file) end console.info message console.success 'For more details on individual commands, see https://github.com/nutella-framework/nutella_framework/wiki/Nutella-Command-Line-Interface' end private def add_cmd_help(file) command = File.basename(file, File.extname(file)) if command.length > 7 message = "#{command}\t" else message = "#{command}\t\t" end message += Object::const_get("Nutella::#{command.capitalize}").description message += "\n" message end end end
Version data entries
60 entries across 60 versions & 1 rubygems