Class: GitCrecord::Diff::PseudoLine
Constant Summary
Constants inherited
from Difference
Difference::REVERSE_SELECTED_MAP, Difference::SELECTED_MAP, Difference::SELECTION_MARKER_WIDTH
Instance Attribute Summary
Attributes inherited from Difference
#subs, #y1, #y2
Instance Method Summary
collapse
Methods inherited from Difference
#content_width, #max_height, #prefix, #prefix_style, #print, #selectable_subs, #selected, #selected=, #strings
Constructor Details
Returns a new instance of PseudoLine.
9
10
11
12
13
|
# File 'lib/git_crecord/diff/line.rb', line 9
def initialize(line)
@line = line || 'file is empty'
super()
@selected = false
end
|
Instance Method Details
#expanded ⇒ Object
27
28
29
|
# File 'lib/git_crecord/diff/line.rb', line 27
def expanded
false
end
|
#generate_diff ⇒ Object
31
32
33
|
# File 'lib/git_crecord/diff/line.rb', line 31
def generate_diff
nil
end
|
#selectable? ⇒ Boolean
23
24
25
|
# File 'lib/git_crecord/diff/line.rb', line 23
def selectable?
false
end
|
#style(is_highlighted) ⇒ Object
35
36
37
|
# File 'lib/git_crecord/diff/line.rb', line 35
def style(is_highlighted)
Curses::A_BOLD | (is_highlighted ? UI::Color.hl : UI::Color.normal)
end
|
#to_s ⇒ Object
15
16
17
|
# File 'lib/git_crecord/diff/line.rb', line 15
def to_s
@line
end
|
#x_offset ⇒ Object
19
20
21
|
# File 'lib/git_crecord/diff/line.rb', line 19
def x_offset
6
end
|