- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Re: Re: Getting cookbook name from recipe
- Date: Mon, 14 May 2012 09:07:31 -0700
On Monday, May 14, 2012 at 7:49 AM, Dr. Agon Smith wrote:
>
Yea! Thank you!
>
>
2012/5/14 Ranjib Dey
>
<
>
>
(mailto:
)>
>
> i think @cookbook_name instance variable holds the name of the current
>
> cookbook inside a recipe.
>
There is also an attribute accessor method for this, which I recommend you
use instead.
Because of the way Chef and ruby work, we can't hide these instance variables
from you, but if we need to change the way something works, it's much more
difficult to maintain compatibility if you're using the instance variables
directly. Contrarily, with a method call, we can just change the
implementation of the method to return the same result.
--
Dan DeLeo
Archive powered by MHonArc 2.6.16.