Sha256: 7c91fc3f20506c99842795f277640d7d847f0aa1bbcc71747ebe64d7a45b59e4

Contents?: true

Size: 327 Bytes

Versions: 29

Compression:

Stored size: 327 Bytes

Contents

module Utils
  class LineBlamer
    def initialize(file, lineno = 1)
      @file, @lineno = file, lineno
    end

    def self.for_line(line)
      location = line.source_location and new(*location)
    end

    def perform(options = '')
      `git 2>/dev/null blame #{options} -L #@lineno,+1 "#@file"`.full?
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
utils-0.60.1 lib/utils/line_blamer.rb
utils-0.60.0 lib/utils/line_blamer.rb
utils-0.59.2 lib/utils/line_blamer.rb
utils-0.59.1 lib/utils/line_blamer.rb
utils-0.59.0 lib/utils/line_blamer.rb
utils-0.58.0 lib/utils/line_blamer.rb
utils-0.57.1 lib/utils/line_blamer.rb
utils-0.57.0 lib/utils/line_blamer.rb
utils-0.56.1 lib/utils/line_blamer.rb
utils-0.56.0 lib/utils/line_blamer.rb
utils-0.55.0 lib/utils/line_blamer.rb
utils-0.54.1 lib/utils/line_blamer.rb
utils-0.54.0 lib/utils/line_blamer.rb
utils-0.53.1 lib/utils/line_blamer.rb
utils-0.53.0 lib/utils/line_blamer.rb
utils-0.52.1 lib/utils/line_blamer.rb
utils-0.52.0 lib/utils/line_blamer.rb
utils-0.51.1 lib/utils/line_blamer.rb
utils-0.51.0 lib/utils/line_blamer.rb
utils-0.50.0 lib/utils/line_blamer.rb