Sha256: 3110a21163a31092f4736e1ba6b5dc98f136385bd352780bb2071a21c0622dd7

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

require 'active_support/core_ext/string/conversions'

module Massimo
  module Commands
    class Help < Base
      def add_options
        command_name = ARGV.shift
        unless command_name.nil? or %w( help version ).include?(command_name)
          @command = "Massimo::Commands::#{command_name.camelize}".constantize rescue nil
        end
      end
      
      def run
        if @command
          puts @command.new.parser
        else
          puts %{
#{Massimo::UI.color('massimo', :cyan)}
a static website builder

Commands:
  massimo build                             # Builds the site
  massimo generate SITE_OR_RESOURCE [FILE]  # Generates a new site
                                              Optionally generates a resource file
  massimo help [COMMAND]                    # Shows info about a specific command
  massimo server [PORT]                     # Runs a local web server
  massimo version                           # Displays current version
  massimo watch                             # Watches your files for changes
}
        end
      end
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
massimo-0.7.0 lib/massimo/commands/help.rb