class Flumtter::self::PluginManager

Public Class Methods

new() click to toggle source
Calls superclass method Flumtter::Window::Buf::Screen::new
# File lib/flumtter/app/plugins/plugin_manager.rb, line 40
def initialize
  super(Plugins::PluginManager::Buf.new, "PluginManager")
  unless indexes.empty?
    command(/^del\s+[#{indexes}]/, 'delete plugin(index)') do |m|
      FileUtils.rm_r(Plugins::PluginManager::Plugins.delete_at(m[1].to_i))
      Window.close
    end
  end
  command(/^update/, 'update all plugins') do
    Plugins::PluginManager::Plugins.each do |plugin|
      `cd #{plugin}; git pull`; sleep 10
    end
  end
end

Private Instance Methods

indexes() click to toggle source
# File lib/flumtter/app/plugins/plugin_manager.rb, line 56
def indexes
  Plugins::PluginManager::Plugins.size.times.to_a.join(",")
end