code: def filter_tasks!(options)
        @tasks = @all_tasks.reject(&:children?)
  
        [:completed, :canceled].each do |filter|
          proc = Proc.new { |e| e.send("#{filter}?") }
          if options.key?(filter)
            if options[filter]
              @tasks = @tasks.select(&proc)
            else
              @tasks = @tasks.reject(&proc)
            end
          end
        end
              
        if tag = options[:tag]
          @tasks = @tasks.select { |t| t.tag?(tag) }
        end
      end
docs: TODO: Smarter task filtering