Method: Bundler::Plugin::API.source

Defined in:
lib/bundler/plugin/api.rb

.source(source, cls = self) ⇒ Object

The plugins should declare that they provide a installation source through this helper.

Parameters:

  • the (String)

    source type they provide

  • (optional) (Class)

    class that handles the source. If not provided, the ‘self` class will be used.



43
44
45
46
# File 'lib/bundler/plugin/api.rb', line 43

def self.source(source, cls = self)
  cls.send :include, Bundler::Plugin::API::Source
  Plugin.add_source source, cls
end