Sha256: 87ce8fe79a1c6df8a59dc4a98db42160eeb86b20ee2df7a32b1136712e9a7295

Contents?: true

Size: 448 Bytes

Versions: 4

Compression:

Stored size: 448 Bytes

Contents

module Pmux
  class PluginClass
    def initialize
    end

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

    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
  end

  Plugin = PluginClass.new
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pmux-0.1.3 lib/pmux/plugin.rb
pmux-0.1.2 lib/pmux/plugin.rb
pmux-0.1.1 lib/pmux/plugin.rb
pmux-0.1.0 lib/pmux/plugin.rb