Class: Puppet::Plugins::DataProviders::PathBasedDataProviderFactory Abstract
- Defined in:
- lib/puppet/plugins/data_providers/data_provider.rb
Overview
This class is abstract.
Factory for creating path based data providers
Direct Known Subclasses
Instance Method Summary collapse
-
#create(name, paths, parent_data_provider) ⇒ DataProvider
Create a path based data provider with the given name and paths.
-
#resolve_paths(datadir, declared_paths, paths, lookup_invocation) ⇒ Array<ResolvedPath>
Resolve the given paths to something that is meaningful as a paths argument when creating a provider using the #create call.
-
#version ⇒ Object
Returns the data provider factory version.
Instance Method Details
#create(name, paths, parent_data_provider) ⇒ DataProvider
Create a path based data provider with the given name and paths
266 267 268 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 266 def create(name, paths, parent_data_provider) raise NotImplementedError, "Subclass of PathBasedDataProviderFactory must implement 'create' method" end |
#resolve_paths(datadir, declared_paths, paths, lookup_invocation) ⇒ Array<ResolvedPath>
Resolve the given paths to something that is meaningful as a paths argument when creating a provider using the #create call.
In order to increase efficiency, the implementors of this method should ensure that resolved paths that exists are included in the result.
283 284 285 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 283 def resolve_paths(datadir, declared_paths, paths, lookup_invocation) [] end |
#version ⇒ Object
Returns the data provider factory version.
return [Integer] the version of this data provider factory
291 292 293 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 291 def version 2 end |