title: How to reduce number of hierarchical 'if statements'
body: <p>I have hierarchical the statements like this</p>
  
  <pre><code>&lt;% @descriptions.each_with_index do |description, i| %&gt;
    &lt;% description.tale2.each do |tax_ref| %&gt;            
      &lt;% if condition %&gt;              
        &lt;% if condition %&gt;
          &lt;% if condition %&gt;                  
            &lt;%= $text_first_describe%&gt; &lt;%= $paren_author_yr %&gt;
               &lt;% ref_sp_uniq.each_with_index do |ref, i| %&gt;
                 &lt;% if ref == tax_ref.ref_wo_brace%&gt;
                    &lt;% execution %&gt;                      
                 &lt;% elsif i == (ref_sp_uniq.size - 1)%&gt;
                    &lt;%# @ref_desc = "#{@ref_desc_numb}. #{tax_ref.ref_wo_brace}" %&gt;
                 &lt;% end %&gt;
               &lt;% end %&gt;
            &lt;% if condition %&gt;
                    &lt;% execution %&gt;                      
            &lt;% elsif condition %&gt;
              &lt;% execution %&gt;
            &lt;% elsif taxon_name.emend_author_year %&gt;                    
               &lt;%= print %&gt;
            &lt;% else %&gt;                    
               &lt;%= print %&gt;                    
            &lt;% end %&gt;
          &lt;% end %&gt;
        &lt;% else %&gt;
          &lt;% if condition %&gt;
            &lt;%= print %&gt;
            &lt;% ref_sp_uniq.each_with_index do |ref, i| %&gt;
               &lt;% if condition %&gt;
                  &lt;% execution %&gt;                      
               &lt;% elsif condition %&gt;
                    &lt;% execution %&gt;                      
               &lt;% end %&gt;
            &lt;% end %&gt;
            &lt;% if condition %&gt;
              &lt;% execution %&gt;                      
            &lt;% elsif condition %&gt;
              &lt;% execution %&gt;                      
            &lt;% elsif condition %&gt;
              &lt;% execution %&gt;                      
            &lt;% else %&gt;
              &lt;% execution %&gt;                      
            &lt;% end %&gt;
          &lt;% end %&gt;
        &lt;% end %&gt;
      &lt;% end %&gt;
    &lt;% end %&gt;        
  &lt;% end %&gt;
  </code></pre>
  
  <p>Kindly suggest me possible way to reduce this kind of junk "if statements".</p>