Class: Pmux::PluginClass

Inherits:
Object
  • Object
show all
Defined in:
lib/pmux/plugin.rb

Instance Method Summary collapse

Constructor Details

#initializePluginClass

Returns a new instance of PluginClass.



3
4
# File 'lib/pmux/plugin.rb', line 3

def initialize
end

Instance Method Details

#load_plugin_dir(dir) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/pmux/plugin.rb', line 11

def load_plugin_dir dir
  dir = File.expand_path dir
  return unless File.directory? dir
  Dir.entries(dir).sort.each {|fname|
    if fname =~ /\.rb$/
      require File.join(dir, fname)
    end
  }
end

#load_pluginsObject



6
7
8
9
# File 'lib/pmux/plugin.rb', line 6

def load_plugins
  dir = File.join File.dirname(__FILE__), 'plugin'
  load_plugin_dir dir
end