Module: Puppet::FileCollection::Lookup
- Included in:
- Network::Rights::Right, Parser::AST, Parser::Resource, Parser::Resource::Param, Type
- Defined in:
- lib/puppet/file_collection/lookup.rb
Overview
A simple module for looking up file paths and indexes in a file collection.
Instance Attribute Summary collapse
-
#file_index ⇒ Object
Returns the value of attribute file_index.
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
Instance Attribute Details
#file_index ⇒ Object
Returns the value of attribute file_index.
6 7 8 |
# File 'lib/puppet/file_collection/lookup.rb', line 6 def file_index @file_index end |
#line ⇒ Object
Returns the value of attribute line.
6 7 8 |
# File 'lib/puppet/file_collection/lookup.rb', line 6 def line @line end |
Instance Method Details
#file ⇒ Object
16 17 18 19 |
# File 'lib/puppet/file_collection/lookup.rb', line 16 def file return nil unless file_index file_collection.path(file_index) end |
#file=(path) ⇒ Object
12 13 14 |
# File 'lib/puppet/file_collection/lookup.rb', line 12 def file=(path) @file_index = file_collection.index(path) end |
#file_collection ⇒ Object
8 9 10 |
# File 'lib/puppet/file_collection/lookup.rb', line 8 def file_collection Puppet::FileCollection.collection end |