Class: Loom::Facts::FactFileProvider
- Defined in:
- lib/loom/facts/fact_file_provider.rb
Direct Known Subclasses
Constant Summary collapse
- InvalidFactFileConversion =
Class.new Loom::LoomError
- YAML_FILE_GLOBS =
[ "facts.yml", "facts/**/*.yml", "facts/**/*.yaml" ]
- TXT_FILE_GLOBS =
[ "facts.txt", "facts/**/*.txt" ]
- ALL_FILE_GLOBS =
[ "facts/**/*" ]
Instance Attribute Summary
Attributes inherited from Provider
Instance Method Summary collapse
- #collect_facts ⇒ Object
-
#initialize(paths) ⇒ FactFileProvider
constructor
A new instance of FactFileProvider.
Methods inherited from Provider
create_fact_providers, #disable, disable_for_host, disabled_for_host?, register_factory
Constructor Details
#initialize(paths) ⇒ FactFileProvider
Returns a new instance of FactFileProvider.
35 36 37 |
# File 'lib/loom/facts/fact_file_provider.rb', line 35 def initialize(paths) @fact_map = convert_file_paths paths end |
Instance Method Details
#collect_facts ⇒ Object
39 40 41 |
# File 'lib/loom/facts/fact_file_provider.rb', line 39 def collect_facts @fact_map.dup end |