Skip to content

Instantly share code, notes, and snippets.

@blaix
Forked from vhata/handler.rb
Created August 27, 2013 16:09
Show Gist options
  • Save blaix/6355593 to your computer and use it in GitHub Desktop.
Save blaix/6355593 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