Class: PluginRegistry
- Inherits:
- 
      Object
      
        - Object
- PluginRegistry
 
- Defined in:
- lib/inspec/plugin/v1/registry.rb,
 lib/inspec/plugin/v1/registry.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Plugin
Instance Attribute Summary collapse
- 
  
    
      #registry  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute registry. 
Instance Method Summary collapse
- 
  
    
      #initialize  ⇒ PluginRegistry 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of PluginRegistry. 
- 
  
    
      #resolve(target)  ⇒ Plugin 
    
    
  
  
  
  
  
  
  
  
  
    Resolve a target via available plugins. 
Constructor Details
#initialize ⇒ PluginRegistry
Returns a new instance of PluginRegistry.
| 4 5 6 | # File 'lib/inspec/plugin/v1/registry.rb', line 4 def initialize @registry = {} end | 
Instance Attribute Details
#registry ⇒ Object (readonly)
Returns the value of attribute registry.
| 2 3 4 | # File 'lib/inspec/plugin/v1/registry.rb', line 2 def registry @registry end | 
Instance Method Details
#resolve(target) ⇒ Plugin
Resolve a target via available plugins.
| 12 13 14 15 16 17 18 | # File 'lib/inspec/plugin/v1/registry.rb', line 12 def resolve(target) modules.each do |m| res = m.resolve(target) return res unless res.nil? end nil end |