module Poise::Helpers::OptionCollector

A resource mixin to add a new kind of attribute, an option collector. These attributes can act as mini-DSLs for things which would otherwise be key/value pairs.

@since 1.0.0 @example Defining an option collector

class MyResource < Chef::Resource
  include Poise::Helpers::OptionCollector
  attribute(:my_options, option_collector: true)
end

@example Using an option collector

my_resource 'name' do
  my_options do
    key1 'value1'
    key2 'value2'
  end
end