Class: Diff::Display::Block
- Inherits:
-
Array
- Object
- Array
- Diff::Display::Block
show all
- Defined in:
- lib/diff/display/data_structure.rb
Overview
This class is an array which contains Line objects. Just like Line classes, several Block classes inherit from Block. If all the lines in the block are added lines then it is an AddBlock. If all lines in the block are removed lines then it is a RemBlock. If the lines in the block are all unmodified then it is an UnMod block. If the lines in the block are a mixture of added and removed lines then it is a ModBlock. There are no blocks that contain a mixture of modified and unmodified lines.
Class Method Summary
collapse
Class Method Details
.add ⇒ Object
174
|
# File 'lib/diff/display/data_structure.rb', line 174
def add; AddBlock.new end
|
178
|
# File 'lib/diff/display/data_structure.rb', line 178
def ; HeaderBlock.new end
|
.mod ⇒ Object
176
|
# File 'lib/diff/display/data_structure.rb', line 176
def mod; ModBlock.new end
|
.nonewline ⇒ Object
179
|
# File 'lib/diff/display/data_structure.rb', line 179
def nonewline; NonewlineBlock.new end
|
.rem ⇒ Object
175
|
# File 'lib/diff/display/data_structure.rb', line 175
def rem; RemBlock.new end
|
.unmod ⇒ Object
177
|
# File 'lib/diff/display/data_structure.rb', line 177
def unmod; UnModBlock.new end
|