Guest User

Untitled

a guest
Nov 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. class Chef
  2. class Resource
  3. oldrun_action = self.instance_method(:run_action)
  4. define_method(:run_action) do |action|
  5. store_prestate
  6. oldrun_action.bind(self).call(action)
  7. store_poststate
  8. end
  9.  
  10. def store_prestate
  11. @prestate = {}
  12. end
  13. def store_poststate
  14. @poststate = {}
  15. end
  16. end
  17. end
Add Comment
Please, Sign In to add comment