Sha256: e12b972078cfcd2967c68be8548b5afc04a1ae15a41391054eb3e403b8a25bee

Contents?: true

Size: 927 Bytes

Versions: 45

Compression:

Stored size: 927 Bytes

Contents

module Rugged
  class Diff
    class Line
      attr_reader :line_origin, :content, :old_lineno, :new_lineno, :content_offset

      def context?
        @line_origin == :context
      end

      def addition?
        @line_origin == :addition
      end

      def deletion?
        @line_origin == :deletion
      end

      def eof_no_newline?
        @line_origin == :eof_no_newline
      end

      def eof_newline_added?
        @line_origin == :eof_newline_added
      end

      def eof_newline_removed?
        @line_origin == :eof_newline_removed
      end

      def file_header?
        @line_origin == :file_header
      end

      def hunk_header?
        @line_origin == :hunk_header
      end

      def binary?
        @line_origin == :binary
      end

      def inspect
        "#<#{self.class.name}:#{object_id} {line_origin: #{line_origin.inspect}, content: #{content.inspect}>"
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 2 rubygems

Version Path
rugged-0.24.6.1 lib/rugged/diff/line.rb
rugged-0.24.5 lib/rugged/diff/line.rb
rugged-0.25.0b10 lib/rugged/diff/line.rb
rugged-0.25.0b9 lib/rugged/diff/line.rb
rugged-0.25.0b8 lib/rugged/diff/line.rb
rugged-0.25.0b7 lib/rugged/diff/line.rb
rugged-0.25.0b6 lib/rugged/diff/line.rb
rugged-0.25.0b5 lib/rugged/diff/line.rb
rugged-0.25.0b4 lib/rugged/diff/line.rb
rugged-0.25.0b3 lib/rugged/diff/line.rb
rugged-0.25.0b2 lib/rugged/diff/line.rb
rugged-0.25.0b1 lib/rugged/diff/line.rb
rugged-0.24.0 lib/rugged/diff/line.rb
rugged-0.24.0b14 lib/rugged/diff/line.rb
rugged-0.24.0b13 lib/rugged/diff/line.rb
rdavila-rugged-0.24.0b13 lib/rugged/diff/line.rb
rugged-0.24.0b12 lib/rugged/diff/line.rb
rugged-0.24.0b11 lib/rugged/diff/line.rb
rugged-0.24.0b9 lib/rugged/diff/line.rb
rugged-0.24.0b8 lib/rugged/diff/line.rb