Class: Puppet::FileServing::Mount::Modules
- Inherits:
-
Puppet::FileServing::Mount
- Object
- Network::AuthStore
- Puppet::FileServing::Mount
- Puppet::FileServing::Mount::Modules
- Defined in:
- lib/puppet/file_serving/mount/modules.rb
Overview
This is the modules-specific mount: it knows how to search through modules for files. Yay.
Instance Attribute Summary
Attributes inherited from Puppet::FileServing::Mount
Instance Method Summary collapse
-
#find(path, request) ⇒ Object
Return an instance of the appropriate class.
- #search(path, request) ⇒ Object
- #valid? ⇒ Boolean
Methods inherited from Puppet::FileServing::Mount
Methods included from Util::Logging
Methods inherited from Network::AuthStore
#allow, #allowed?, #deny, #empty?, #globalallow?, #initialize, #interpolate, #reset_interpolation, #to_s
Constructor Details
This class inherits a constructor from Puppet::FileServing::Mount
Instance Method Details
#find(path, request) ⇒ Object
Return an instance of the appropriate class.
7 8 9 10 11 12 |
# File 'lib/puppet/file_serving/mount/modules.rb', line 7 def find(path, request) module_name, relative_path = path.split("/", 2) return nil unless mod = request.environment.module(module_name) mod.file(relative_path) end |
#search(path, request) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/puppet/file_serving/mount/modules.rb', line 14 def search(path, request) module_name, relative_path = path.split("/", 2) return nil unless mod = request.environment.module(module_name) return nil unless path = mod.file(relative_path) [path] end |
#valid? ⇒ Boolean
22 23 24 |
# File 'lib/puppet/file_serving/mount/modules.rb', line 22 def valid? true end |