- From: Jay Feldblum <
>
- To:
- Subject: [chef] Re: Re: Re: Re: FC001, attributes as strings vs symbols
- Date: Wed, 17 Oct 2012 13:01:17 -0400
Phil,
That's correct. Under the hood, it's all strings.
The symbol and method syntaxes are just a small bit of sugar over the underlying string syntax. But all of the node attribute keys are kept as strings internally. And all of the methods that fetch keys or iterate over the elements give the keys as strings, not as symbols (and certainly not as methods).
Cheers,
Jay
On Wed, Oct 17, 2012 at 12:40 PM, Phil Dibowitz
<
" target="_blank">
> wrote:
My understanding is that because of the way that attribute code works, if you
use symbols to access attributes, it actually converts them to a string before
doing a symbol look-up on them.
Which... ya know... works and all, but probably isn't what you intended.
--
Phil Dibowitz
">
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"Be who you are and say what you feel, because those who mind don't matter
and those who matter don't mind."
- Dr. Seuss
- [chef] Re: Re: Re: Re: Re: FC001, attributes as strings vs symbols, (continued)
Archive powered by MHonArc 2.6.16.