Module: Textbringer::Plugin

Defined in:
lib/textbringer/plugin.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.directoryObject

Returns the value of attribute directory.



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

def directory
  @directory
end

Class Method Details

.load_pluginsObject



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

def self.load_plugins
  files = Gem.find_latest_files("textbringer_plugin.rb", false) +
    Dir.glob(File.join(directory, "*/**/textbringer_plugin.rb"))
  files.each do |file|
    begin
      load(file)
    rescue Exception => e
      show_exception(e)
    end
  end
end