Sha256: 9227d89e3ae1bbd6536e723ff90c8f244b9b0e173773f2f767281bbaec17f60a

Contents?: true

Size: 756 Bytes

Versions: 2

Compression:

Stored size: 756 Bytes

Contents

require 'core/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|
        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"
      end
      console.info message
      console.info 'For more details on individual commands, see https://github.com/nutella-framework/nutella_framework/wiki/Nutella-Command-Line-Interface'
    end
    
  end
  
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nutella_framework-0.3.1 lib/core/commands/help.rb
nutella_framework-0.3.0 lib/core/commands/help.rb