Class Clio::Usage::Command
In: lib/clio/usage/command.rb
Parent: Subcommand

Command

This is the toplevel "main" command.

Methods

cache   new   parse  

Public Class methods

New Usage.

[Source]

# File lib/clio/usage/command.rb, line 15
      def initialize(name=nil, &block)
        name ||= File.basename($0)
        super(name, &block)
      end

Public Instance methods

Cache usage into a per-user cache file for reuse. This can be used to greatly speed up tab completion.

[Source]

# File lib/clio/usage/command.rb, line 138
      def cache
        File.open(cache_file, 'w'){ |f| f << to_yaml }
      end

[Source]

# File lib/clio/usage/command.rb, line 131
      def parse(argv)
        Parser.new(self, argv).parse #(argv)
      end

[Validate]