Sha256: 1413fc44f671bbc8fb00ec3d7fc7b3dbed95496a3fba5416692c208e5c72e845

Contents?: true

Size: 424 Bytes

Versions: 3

Compression:

Stored size: 424 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|
        load(file)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
textbringer-0.2.4 lib/textbringer/plugin.rb
textbringer-0.2.5 lib/textbringer/plugin.rb
textbringer-0.2.3 lib/textbringer/plugin.rb