Class: Linguist::Source::RuggedRepository::Diff

Inherits:
Diff
  • Object
show all
Defined in:
lib/linguist/source/rugged.rb

Defined Under Namespace

Classes: Delta

Instance Method Summary collapse

Constructor Details

#initialize(rugged_diff) ⇒ Diff

Returns a new instance of Diff.



26
27
28
# File 'lib/linguist/source/rugged.rb', line 26

def initialize(rugged_diff)
  @diff = rugged_diff
end

Instance Method Details

#each_delta(&block) ⇒ Object



30
31
32
33
34
# File 'lib/linguist/source/rugged.rb', line 30

def each_delta(&block)
  @diff.each_delta.map do |delta|
    Delta.new(delta)
  end.each(&block)
end