On May 6, 5:46 pm, Trevor Vaughan <tvaug...@onyxpoint.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I don't think that ruby itself allows variables with dashes in the name > since it will probably interpret them as minus signs and try to > interpret the variables around the symbol.
Right. Which is why, in ActiveLdap for example, I would have to use a string with the hash access method: >> ns01.cn => "ns01.domain.com" >> ns01.dns-ns NoMethodError: undefined method `dns' for #<Machine:0x240ea28> >> ns01["cn"] => "ns01.domain.com" >> ns01["dns-ns"] => "10041801" And in other cases I could use the instance_variable_get method to pull it out: >> ns01.instance_variable_get("@data")["dns-ns"] => ["10041801"] But I don't have either of those from a manifest. So I can trysomething like get_var[1]. I was just hoping someone out there had a cleaner work around for me. [1] http://projects.puppetlabs.com/projects/puppet/wiki/Ldap_Nodes -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.