Class: Chef::Resource
- Defined in:
- lib/garcon/chef/provider/archive.rb,
lib/garcon/chef/provider/partial.rb,
lib/garcon/chef/provider/civilize.rb,
lib/garcon/chef/provider/download.rb,
lib/garcon/chef/provider/recovery.rb,
lib/garcon/chef/provider/zip_file.rb,
lib/garcon/chef/provider/development.rb,
lib/garcon/chef/provider/house_keeping.rb
Direct Known Subclasses
Archive, Civilize, Development, Download, HouseKeeping, NodeCache, Partial, ZipFile
Defined Under Namespace
Classes: Archive, Civilize, Development, Download, HouseKeeping, NodeCache, Partial, Recovery, ZipFile
Instance Attribute Summary collapse
-
#recovery_handlers ⇒ Object
Returns the value of attribute recovery_handlers.
Instance Method Summary collapse
Instance Attribute Details
#recovery_handlers ⇒ Object
Returns the value of attribute recovery_handlers.
67 68 69 |
# File 'lib/garcon/chef/provider/recovery.rb', line 67 def recovery_handlers @recovery_handlers end |
Instance Method Details
#recovery(*args, &block) ⇒ Object
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/garcon/chef/provider/recovery.rb', line 69 def recovery(*args, &block) = { retries: 1 } exceptions = [] args.each do |arg| exceptions << arg if arg.is_a?(Class) .merge!(arg) if arg.is_a?(Hash) end @recovery_handlers ||= [] @recovery_handlers << Recovery.new( || {}, exceptions || [], block) end |