class

Similar::InlineChange

Inherits JSON::Serializable < Reference < Object

Represents the expanded textual change with inline highlights.

This is like Change but with inline highlight info.

Constructors

from_change(change : Change(T)) : InlineChange forall T

Creates an InlineChange from a regular Change.

Source
new(tag : ChangeTag, old_index : Int32 | Nil, new_index : Int32 | Nil, values : Array(Tuple(Bool, String)))
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

missing_newline?

Returns true if this change does not end in a newline and must be followed up by one if line based diffs are used.

Source
new_index

Returns the new index if available.

Source
old_index

Returns the old index if available.

Source
tag

Returns the change tag.

Source
values

Returns the changed values.

Each item is a tuple in the form (emphasized, value) where emphasized is true if it should be highlighted as an inline diff.

Source