lib/kitchen/recipe.rb
# Executes the block given to +Recipe.new+ on the document.  Aka, does the baking.
#
Executes the block given to +Recipe.new+ on the document.  Aka, does the baking.
Executes the block given to + Recipe . new + on the document . Aka does the baking .
def bake
      with_my_locales do
        @block.to_proc.call(document)
      end
    rescue RecipeError, ElementNotFoundError, Nokogiri::CSS::SyntaxError => e
      print_recipe_error_and_exit(e)
    rescue ArgumentError, NoMethodError => e
      raise unless any_stack_file_matches_source_location?(e)
      print_recipe_error_and_exit(e)
    rescue NameError => e
      raise unless stack_starts_with_source_location?(e)
      print_recipe_error_and_exit(e)
    end
def bake with_my_locales do @block . to_proc . call ( document ) end rescue RecipeError , ElementNotFoundError , Nokogiri :: CSS :: SyntaxError => e print_recipe_error_and_exit ( e ) rescue ArgumentError , NoMethodError => e raise unless any_stack_file_matches_source_location? ( e ) print_recipe_error_and_exit ( e ) rescue NameError => e raise unless stack_starts_with_source_location? ( e ) print_recipe_error_and_exit ( e ) end
Executes the block given to +Recipe.new+ on the document.
Executes the block given to + Recipe . new + on the document .