In Files

Parent

Methods

Files

Git::Diff::DiffFile

Attributes

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

Public Class Methods

new(base, hash) click to toggle source
# File lib/git/diff.rb, line 72
def initialize(base, hash)
  @base = base
  @patch = hash[:patch]
  @path = hash[:path]
  @mode = hash[:mode]
  @src = hash[:src]
  @dst = hash[:dst]
  @type = hash[:type]
  @binary = hash[:binary]
end

Public Instance Methods

binary?() click to toggle source
# File lib/git/diff.rb, line 83
def binary?
  !!@binary
end
blob(type = :dst) click to toggle 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]

Generated with the Darkfish Rdoc Generator 2.