def report
      repo = nil
      if File.exist?(File.join(@dir, '.git'))
        repo = Git.new(@dir, @exclude, @author)
      elsif File.exist?(File.join(@dir, '.svn'))
        repo = Svn.new(@dir)
      else
        raise 'Only Git repositories supported now'
      end
      count = repo.hits.map(&:total).inject(:+)
      case @format
      when 'xml'
        "<hoc><total>#{count}</total></hoc>"
      when 'json'
        "{\"total\":#{count}}"
      when 'text'
        "Total Hits-of-Code: #{count}"
      when 'int'
        count
      else
        raise 'Only "text|xml|json|int" formats are supported now'
      end
    end
def report
      repo = nil
      if File.exist?(File.join(@dir, '.git'))
        repo = Git.new(@dir, @exclude, @author)
      elsif File.exist?(File.join(@dir, '.svn'))
        repo = Svn.new(@dir)
      else
        raise 'Only Git repositories supported now'
      end
      count = repo.hits.map(&:total).inject(:+)
      case @format
      when 'xml'
        "<hoc><total>#{count}</total></hoc>"
      when 'json'
        "{\"total\":#{count}}"
      when 'text'
        "Total Hits-of-Code: #{count}"
      when 'int'
        count
      else
        raise 'Only "text|xml|json|int" formats are supported now'
      end
    end
Ctor.
 +opts+:: Options
 Generate report.