File: diff.rb

package info (click to toggle)
ruby-rugged 1.9.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,752 kB
  • sloc: ansic: 8,722; ruby: 7,473; sh: 99; makefile: 5
file content (25 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright (C) the Rugged contributors.  All rights reserved.
#
# This file is part of Rugged, distributed under the MIT license.
# For full terms see the included LICENSE file.

require 'rugged/diff/hunk'
require 'rugged/diff/line'
require 'rugged/diff/delta'

module Rugged
  class Diff
    include Enumerable
    alias each each_patch

    attr_reader :owner

    def patches
      each_patch.to_a
    end

    def deltas
      each_delta.to_a
    end
  end
end