class Busser::Command::PluginList

Plugin list command.

@author Fletcher Nichol <fnichol@nichol.ca>

Public Instance Methods

list() click to toggle source
# File lib/busser/command/plugin_list.rb, line 31
def list
  if plugin_data.empty?
    say "No plugins installed yet"
  else
    print_table([["Plugin", "Version"]] + plugin_data)
  end
end

Private Instance Methods

plugin_data() click to toggle source
# File lib/busser/command/plugin_list.rb, line 41
def plugin_data
  @plugin_data ||= Busser::Plugin.runner_plugins.map do |path|
    spec = Busser::Plugin.gem_from_path(path)
    [File.basename(path), (spec && spec.version)]
  end
end