Class: Puppet::Plugins::DataProviders::ResolvedPath Deprecated Private
- Defined in:
- lib/puppet/plugins/data_providers/data_provider.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class that keeps track of the original path (as it appears in the declaration, before interpolation), the fully resolved path, and whether or the resolved path exists.
Instance Attribute Summary collapse
- #original_path ⇒ Object readonly private
- #path ⇒ Object readonly private
Instance Method Summary collapse
- #exists? ⇒ Boolean (also: #exist?) deprecated private Deprecated.
- #initialize(original_path, path) ⇒ ResolvedPath constructor deprecated private Deprecated.
Constructor Details
#initialize(original_path, path) ⇒ ResolvedPath
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ResolvedPath.
209 210 211 212 213 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 209 def initialize(original_path, path) @original_path = original_path @path = path @exists = nil end |
Instance Attribute Details
#original_path ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
204 205 206 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 204 def original_path @original_path end |
#path ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
204 205 206 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 204 def path @path end |
Instance Method Details
#exists? ⇒ Boolean Also known as: exist?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns cached info if the path exists or not.
217 218 219 220 |
# File 'lib/puppet/plugins/data_providers/data_provider.rb', line 217 def exists? @exists = @path.exist? if @exists.nil? @exists end |