struct Agate::Diff::Line

Overview

A single line within a hunk.

Defined in:

agate/patch.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(origin : Char, content : String, old_lineno : Int32, new_lineno : Int32) #

[View source]

Instance Method Detail

def addition? : Bool #

Returns true if this line is an addition.


[View source]
def binary? : Bool #

Returns true if this line is binary.


[View source]
def clone #

[View source]
def content : String #

def context? : Bool #

Returns true if this line is a context line.


[View source]
def copy_with(origin _origin = @origin, content _content = @content, old_lineno _old_lineno = @old_lineno, new_lineno _new_lineno = @new_lineno) #

[View source]
def deletion? : Bool #

Returns true if this line is a deletion.


[View source]
def file_header? : Bool #

Returns true if this line is a file header.


[View source]
def hunk_header? : Bool #

Returns true if this line is a hunk header.


[View source]
def new_lineno : Int32 #

def old_lineno : Int32 #

def origin : Char #