Class Git::Diff::DiffFile
In: lib/git/diff.rb
Parent: Object

Methods

blob   new  

Attributes

dst  [RW] 
mode  [RW] 
patch  [RW] 
path  [RW] 
src  [RW] 
type  [RW] 

Public Class methods

[Source]

# File lib/git/diff.rb, line 77
      def initialize(base, hash)
        @base = base
        @patch = hash[:patch]
        @path = hash[:path]
        @mode = hash[:mode]
        @src = hash[:src]
        @dst = hash[:dst]
        @type = hash[:type]
      end

Public Instance methods

[Source]

# File lib/git/diff.rb, line 87
      def blob(type = :dst)
        if type == :src
          @base.object(@src) if @src != '0000000'
        else
          @base.object(@dst) if @dst != '0000000'
        end
      end

[Validate]