Class: OctocatalogDiff::Facts::JSON
- Inherits:
-
Object
- Object
- OctocatalogDiff::Facts::JSON
- Defined in:
- lib/octocatalog-diff/facts/json.rb
Overview
Deal with facts in JSON files
Class Method Summary collapse
Class Method Details
.fact_retriever(options = {}, node = '') ⇒ Hash
Returns Facts.
15 16 17 18 19 |
# File 'lib/octocatalog-diff/facts/json.rb', line 15 def self.fact_retriever( = {}, node = '') facts = ::JSON.parse(.fetch(:fact_file_string)) node = facts.fetch('fqdn', 'unknown.node') if node.empty? { 'name' => node, 'values' => facts } end |