title: Ruby: nested if statements
body: <p>I was writing some code and it ended up being way too ugly to my liking. Is there anyway that I can refactor it so that I don't use nested if statements?</p>
  
  <pre><code>def hours_occupied(date)
    #assuming date is a valid date object    
    availability = get_work_hours(date)
    focus = "work"
  
    if availability.nil
      availability = get_family_hours(date)
      focus = "family"
  
      if availability.nil
        availability = get_friend_hours(date)
        focus = "friends"
      end
    end
  end
  </code></pre>
  
  <p>I know I'll be able to do something like this for availability</p>
  
  <pre><code>availability = get_work_hours(date) || get_family_hours(date) || get_friend_hours(date)
  </code></pre>
  
  <p>but how do I set the focus variable accordingly?</p>