Class: Bundler::Plugin::API
| Relationships & Source Files | |
| Namespace Children | |
| Modules: | |
| Inherits: | Object | 
| Defined in: | lib/bundler/plugin/api.rb, lib/bundler/plugin/api/source.rb | 
Class Method Summary
- 
    
      .command(command, cls = self)  
    
    The plugins should declare that they handle a command through this helper. 
- .hook(event, &block)
- 
    
      .source(source, cls = self)  
    
    The plugins should declare that they provide a installation source through this helper. 
Instance Method Summary
- 
    
      #cache_dir  ⇒ Pathname 
    
    The cache dir to be used by the plugins for storage. 
- #method_missing(name, *args, &blk)
- #respond_to_missing?(name, include_private = false) ⇒ Boolean
- 
    
      #tmp(*names)  ⇒ Pathname 
    
    A tmp dir to be used by plugins Accepts names that get concatenated as suffix. 
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &blk)
[ GitHub ]# File 'lib/bundler/plugin/api.rb', line 67
def method_missing(name, *args, &blk) return Bundler.send(name, *args, &blk) if Bundler.respond_to?(name) return SharedHelpers.send(name, *args, &blk) if SharedHelpers.respond_to?(name) super end
Class Method Details
.command(command, cls = self)
The plugins should declare that they handle a command through this helper.
# File 'lib/bundler/plugin/api.rb', line 33
def self.command(command, cls = self) Plugin.add_command command, cls end
.hook(event, &block)
[ GitHub ].source(source, cls = self)
The plugins should declare that they provide a installation source through this helper.
# 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
Instance Method Details
    #cache_dir  ⇒ Pathname 
  
The cache dir to be used by the plugins for storage
    #respond_to_missing?(name, include_private = false)  ⇒ Boolean 
  
# File 'lib/bundler/plugin/api.rb', line 75
def respond_to_missing?(name, include_private = false) SharedHelpers.respond_to?(name, include_private) || Bundler.respond_to?(name, include_private) || super end
    #tmp(*names)  ⇒ Pathname 
  
A tmp dir to be used by plugins Accepts names that get concatenated as suffix