Method: ChefAPI::Schema#flavor

Defined in:
lib/chef-api/schema.rb

#flavor(id, &block) ⇒ Proc

Create a lazy-loaded block for a given flavor.

Examples:

Create a block for Enterprise Chef

flavor :enterprise do
  attribute :custom_value
end

Parameters:

  • id (Symbol)

    the id of the flavor to target

  • block (Proc)

    the block to capture

Returns:

  • (Proc)

    the given block



62
63
64
65
# File 'lib/chef-api/schema.rb', line 62

def flavor(id, &block)
  @flavor_attributes[id] = block
  block
end