Class: Octopress::Ink::Commands::List

Inherits:
Object
  • Object
show all
Defined in:
lib/octopress-ink/commands/list.rb

Class Method Summary collapse

Class Method Details

.process_command(p) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/octopress-ink/commands/list.rb', line 5

def self.process_command(p)
  p.command(:list) do |c|
    c.syntax "list [plugin] [options]"
    c.description "Get a list of installed octopress ink plugins for this site."
    c.option "all", "--all", "List all plugins and their assets."
    CommandHelpers.add_asset_options(c, 'List')

    c.action do |args, options|
      if args.empty?
        Octopress::Ink.list(options)
      else
        name = args.first
        Octopress::Ink.plugin_list(name, options)
      end
    end
  end
end