opscode/chef — pull request #556 by danielsdeleo (2012-12-18 21:27:56+00:00)
Title: Define LWRP Behavior in Subclasses of Resource and Provider

Prior implementation of LWRP was using unnecessary metaprogramming to add the LWRP DSL into individual LWRP classes at class definition time, making the code difficult to read and understand.

Moving the LWRP DSL and file load functionality into subclasses of Resource and Provider lets us write the code using basic ruby features with only the minimum necessary metaprogramming magic.

This also enables future improvements so that LWRP-specific features, (such as adding the recipe DSL to providers) can be scoped to only LWRP resources instead of adding functionality to the base (Resource/Provider) classes.