Class: HieraFiver
- Inherits:
-
Object
- Object
- HieraFiver
- Defined in:
- lib/puppet/HieraFiver.rb
Instance Attribute Summary collapse
-
#backends_data_dig ⇒ Object
Use accessors in order to specify more backends under each category.
-
#backends_data_hash ⇒ Object
Use accessors in order to specify more backends under each category.
-
#backends_lookup_key ⇒ Object
Use accessors in order to specify more backends under each category.
Instance Method Summary collapse
-
#initialize(yaml_text) ⇒ HieraFiver
constructor
A new instance of HieraFiver.
- #to_5 ⇒ Object
Constructor Details
#initialize(yaml_text) ⇒ HieraFiver
Returns a new instance of HieraFiver.
12 13 14 15 16 17 18 19 20 |
# File 'lib/puppet/HieraFiver.rb', line 12 def initialize(yaml_text) @backends_data_hash = ['yaml', 'json', 'hocon'] @backends_lookup_key = ['eyaml'] @backends_data_dig = [] @config5 = { 'version' => 5, 'hierarchy' => [], } @config3 = YAML.load(yaml_text) parse_config3 end |
Instance Attribute Details
#backends_data_dig ⇒ Object
Use accessors in order to specify more backends under each category
23 24 25 |
# File 'lib/puppet/HieraFiver.rb', line 23 def backends_data_dig @backends_data_dig end |
#backends_data_hash ⇒ Object
Use accessors in order to specify more backends under each category
23 24 25 |
# File 'lib/puppet/HieraFiver.rb', line 23 def backends_data_hash @backends_data_hash end |
#backends_lookup_key ⇒ Object
Use accessors in order to specify more backends under each category
23 24 25 |
# File 'lib/puppet/HieraFiver.rb', line 23 def backends_lookup_key @backends_lookup_key end |
Instance Method Details
#to_5 ⇒ Object
25 26 27 |
# File 'lib/puppet/HieraFiver.rb', line 25 def to_5 fix_quotes(@config5.to_yaml) end |