InlineClass
- Namespace
- Ancestors
-
-
Enumerable
-
Value
-
Formats Operations inline in a String. Additions are shown as {+…+}
and
deletions as [-…-]
. Replacements are shown as a deletion followed by an
insertion.
This format is used by Difference::String for single-line Strings.
This format is inspired by the plain word “diff” format used by Git. That format was surely inspired by something before it, but it’s where I first saw it, so that’s what I’m referencing.
Constructor
initialize(operationsOperations)#⚙
Formats operations as they would be applied inline on a String.
Instance Methods
each{ |stringString| … }self#⚙
Enumerates the formatted operations.
eachEnumerator<
String>
#⚙
Returns an Enumerator over the formatted operations.
to_sString#⚙
Returns the concatenation of the formatted operations.