Sha256: e21e2a5235f36e61e9dbe5461217ec7973d91b9adb2d42665bc1b21db847afe9

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 Bytes

Contents

module Sunzi
  module Plugin
    class << self
      # Find gems that start with "sunzi-*" and require them automatically.

      def load
        plugins = Gem::Specification.find_all.select{|plugin| plugin.name =~ /sunzi-.+/ }
        plugins.each do |plugin|
          require plugin.name.gsub('-','/')

          Sunzi.thor.source_paths << Pathname.new(plugin.gem_dir)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sunzi-2.1.0 lib/sunzi/plugin.rb