Sha256: 8ce0b4f90457378b23034c01e4bdba57e8dd49a834e86f57c3052c00f9d8ef3d

Contents?: true

Size: 834 Bytes

Versions: 16

Compression:

Stored size: 834 Bytes

Contents

class ZergXcode::Plugins::Help
  def help
    {:short => 'command-line usage instructions',
     :long => <<"END" }
Usage: help [command]

Shows the usage for the given command. If no command is  given, shows a list of
commands with a short description for each command.
END
  end
  
  def run(args)
    helpstr = "Xcode Project Modifier brought to you by Zergling.Net.\n"
  
    plugin = args.shift
    if ZergXcode::Plugins.all.include? plugin
      help = ZergXcode::Plugins.get(plugin).help
      helpstr << "#{plugin} - #{help[:short]}\n#{help[:long]}"
    else
      helpstr << "Available commands:\n"
      ZergXcode::Plugins.all.each do |plugin|
        short_help = ZergXcode::Plugins.get(plugin).help[:short]
        helpstr << "  #{plugin}: #{short_help}\n"
      end
    end
    
    print helpstr
    helpstr
  end  
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
costan-zerg_xcode-0.1 lib/zerg_xcode/plugins/help.rb
costan-zerg_xcode-0.2.1 lib/zerg_xcode/plugins/help.rb
costan-zerg_xcode-0.2 lib/zerg_xcode/plugins/help.rb
costan-zerg_xcode-0.3.1 lib/zerg_xcode/plugins/help.rb
costan-zerg_xcode-0.3.2 lib/zerg_xcode/plugins/help.rb
costan-zerg_xcode-0.3.3 lib/zerg_xcode/plugins/help.rb
costan-zerg_xcode-0.3.4 lib/zerg_xcode/plugins/help.rb
costan-zerg_xcode-0.3 lib/zerg_xcode/plugins/help.rb
zerg_xcode-0.3.4 lib/zerg_xcode/plugins/help.rb
zerg_xcode-0.3.3 lib/zerg_xcode/plugins/help.rb
zerg_xcode-0.3.1 lib/zerg_xcode/plugins/help.rb
zerg_xcode-0.3.2 lib/zerg_xcode/plugins/help.rb
zerg_xcode-0.2.1 lib/zerg_xcode/plugins/help.rb
zerg_xcode-0.2 lib/zerg_xcode/plugins/help.rb
zerg_xcode-0.1 lib/zerg_xcode/plugins/help.rb
zerg_xcode-0.3 lib/zerg_xcode/plugins/help.rb