Library code is just 100% plain ruby code, so you can't use the recipe dsl unless you do special stuff to set that up. If you are trying to write class based resources using the lwp dsl, check out Poise and some of the cookbooks using it.
--NoahAmeya Savale < " target="_blank"> > wrote:Hi Guys,I was wondering if it was possible to use a chef resource such as 'file' or 'cookbook_file' in a custom library. I have tried the following and none of them have been successful:class Chefclass Recipeclass myhelperfile "..." doendclass Chefclass Resourceclass myhelperfile "..." doendclass Chefclass Resourceclass myhelper < ::Chef::Resourcefile "..." doend-thanks
Archive powered by MHonArc 2.6.16.