Sha256: 910a313dd9330e58cca0ff828363421b22434ef59ca30fa5105a9731de4f28b8

Contents?: true

Size: 510 Bytes

Versions: 8

Compression:

Stored size: 510 Bytes

Contents

# frozen_string_literal: true

module Textbringer
  module Plugin
    class << self
      attr_accessor :directory
    end

    @directory = File.expand_path("~/.textbringer/plugins")

    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
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
textbringer-1.0.0 lib/textbringer/plugin.rb
textbringer-0.3.2 lib/textbringer/plugin.rb
textbringer-0.3.1 lib/textbringer/plugin.rb
textbringer-0.3.0 lib/textbringer/plugin.rb
textbringer-0.2.9 lib/textbringer/plugin.rb
textbringer-0.2.8 lib/textbringer/plugin.rb
textbringer-0.2.7 lib/textbringer/plugin.rb
textbringer-0.2.6 lib/textbringer/plugin.rb