What if you make it a hash instead of a list?
set[:packages_install_specific] = {
"js" => "1.70-8",
"icu" => "3.6-5.16.1",
...
}
Then you can do, eg, node.normal_attrs[:packages_install_specific].delete("js")--
On Wed, Feb 1, 2012 at 7:05 PM, Robert Keng < " target="_blank"> > wrote:I'm probably not using the right terms, but lets' say I have the following:
set[:packages_install_specific] = [["js","1.70-8"],["icu","3.6-5.16.1"],["libicu","3.6-5.16.1"],["libicu-devel","3.6-5.16.1"]]
The attrs looks like:{"normal": {"packages_install_specific": [["js","1.70-8"],["icu","3.6-5.16.1"],["libicu","3.6-5.16.1"],["libicu-devel","3.6-5.16.1"]]
...
Is it possible to delete the tuple ["libicu-devel","3.6-5.16.1"] programmatically in a recipe? I've tried using:
node.normal_attrs[:packages_install_specific].delete(:libicu-devel) rescue nil
But I probably can't refer to it as a key...Can someone shed some light on this? If someone can forward me to some docs I'd greatly appreciate it. Running 0.9.x (8 I believe), thanks in advance!
-RobertIan Marlier | Senior Systems EngineerBrightcove, Inc.
Archive powered by MHonArc 2.6.16.