# class FileServing::Mount::Modules

This is the modules-specific mount: it knows how to search through modules for files. Yay.

### Public Instance Methods

find(path, request) click to toggle source

Return an instance of the appropriate class.

    # File lib/puppet/file_serving/mount/modules.rb, line 7
    def find(path, request)
      raise "No module specified" if path.to_s.empty?
      module_name, relative_path = path.split("/", 2)
      return nil unless mod = request.environment.module(module_name)

      mod.file(relative_path)
    end

search(path, request) click to toggle source

    # File lib/puppet/file_serving/mount/modules.rb, line 15
    def search(path, request)
      if result = find(path, request)
        [result]
      end
    end

valid?() click to toggle source

    # File lib/puppet/file_serving/mount/modules.rb, line 21
    def valid?
      true
    end