Class | Ohai::Loader |
In: |
lib/ohai/loader.rb
|
Parent: | Object |
Ohai plugin loader. Finds all the plugins in your `Ohai::Config[:plugin_path]` (supports a single or multiple path setting here), evaluates them and returns plugin objects.
V6PluginClass | = | Struct.new(:plugin_class, :plugin_path, :plugin_dir_path) | Simple struct to track a v6 plugin‘s class, file path, and the root of the plugin dir from which it was loaded. |
Load a specified file as an ohai plugin and creates an instance of it. Not used by ohai itself, but can be used to load a plugin for testing purposes. plugin_dir_path is required when loading a v6 plugin.
Reads the file specified by `plugin_path` and returns a class object for the ohai plugin defined therein.
If `plugin_dir_path` is given, and the file at `plugin_path` is a v6 plugin, the ‘relative path’ of the plugin (used by `require_plugin()`) is computed by finding the relative path from `plugin_dir_path` to `plugin_path`
Searches all plugin paths and returns an Array of PluginFile objects representing each plugin file.