Class: Pmux::PluginClass
- Inherits:
-
Object
- Object
- Pmux::PluginClass
- Defined in:
- lib/pmux/plugin.rb
Instance Method Summary collapse
-
#initialize ⇒ PluginClass
constructor
A new instance of PluginClass.
- #load_plugin_dir(dir) ⇒ Object
- #load_plugins ⇒ Object
Constructor Details
#initialize ⇒ PluginClass
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. dir return unless File.directory? dir Dir.entries(dir).sort.each {|fname| if fname =~ /\.rb$/ require File.join(dir, fname) end } end |
#load_plugins ⇒ Object
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 |