Method: ChefAPI::Schema#load_flavor

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

#load_flavor(id) ⇒ true, false

Load the flavor block for the given id.

Parameters:

  • id (Symbol)

    the id of the flavor to target

Returns:

  • (true, false)

    true if the flavor existed and was evaluted, false otherwise



76
77
78
79
80
81
82
83
# File 'lib/chef-api/schema.rb', line 76

def load_flavor(id)
  if block = @flavor_attributes[id]
    unlock { instance_eval(&block) }
    true
  else
    false
  end
end