> -----Original Message-----
> From: Tim Uckun [mailto:timuckun / gmail.com] 
>
> Can anybody suggest a more elegant and rubyish way to do this?
> 
>  unless conf['hosts'][hostname]['groups'].nil?
>    conf['hosts'][hostname]['groups'].each { |group|
>      unless conf['crontables'][group].nil?
>          conf['crontables'][group].each { | tab_item|
>            tab_entries << tab_item
>          }
>       end #Unless
>     }
>   end #unless

use (value||[]), ie:
 
    (conf['hosts'][hostname]['groups']||[]).each { |group|
          (conf['crontables'][group]||[]).each { | tab_item|
            tab_entries << tab_item
          }
     }