Sha256: c9f914f005ba64fff2b6f81ce984f05b3ad382bcaa4670ab18be81ebbcf5f47b
Contents?: true
Size: 543 Bytes
Versions: 3
Compression:
Stored size: 543 Bytes
Contents
# frozen_string_literal: true module Textbringer module Plugin def self.load_plugins files = Gem.find_files("textbringer_plugin.rb") files.group_by { |file| file.slice(/([^\/]+)-[\w.]+\/lib\/textbringer_plugin\.rb\z/, 1) }.map { |gem, versions| versions.sort_by { |version| v = version.slice(/[^\/]+-([\w.]+)\/lib\/textbringer_plugin\.rb\z/, 1) Gem::Version.create(v) }.last }.each do |file| load(file) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
textbringer-0.2.1 | lib/textbringer/plugin.rb |
textbringer-0.2.0 | lib/textbringer/plugin.rb |
textbringer-0.1.9 | lib/textbringer/plugin.rb |