Skip to content

Instantly share code, notes, and snippets.

@vhata
Created August 27, 2013 16:02
Show Gist options
  • Save vhata/6355526 to your computer and use it in GitHub Desktop.
Save vhata/6355526 to your computer and use it in GitHub Desktop.
class Chef
class Provider
alias_method :old_converge_by, :converge_by
def converge_by(descriptions, &block)
if descriptions.kind_of? String
run_context.descriptions << descriptions
descriptions = "X #{descriptions}"
elsif descriptions.kind_of? Array
run_context.descriptions.concat(descriptions)
end
old_converge_by(descriptions, &block)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment