Re: A more elegant way to do this?

  end #Unless

end #unless

use (value||[]), ie:

(conf['hosts'][hostname]['groups']||[]).each { |group|
      (conf['crontables'][group]||[]).each { | tab_item|
        tab_entries << tab_item

Thanks for all your replies. I knew there was a better way, I kept
reading and thinking that I am still not thinking in ruby.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs