Method: Puppet::Provider::DscBaseProvider#enum_attributes
- Defined in:
- lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb
#enum_attributes(context) ⇒ Array
Parses the DSC resource type definition to retrieve the names of any attributes which are specified as enums Note that for complex types, especially those that have nested CIM instances, this will return for any data type which includes an Enum, not just for simple ‘Enum[]` or `Optional[Enum]` data types.
640 641 642 |
# File 'lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb', line 640 def enum_attributes(context) context.type.attributes.select { |_name, properties| properties[:type].include?('Enum[') }.keys end |