Class: Ruvi::PlainTextHighlighter

Inherits:
Highlighter show all
Defined in:
lib/plugins/hl_plain.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Highlighter

has_structure?, inherited

Class Method Details

.can_highlight?(buffer) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/plugins/hl_plain.rb', line 16

def self.can_highlight? buffer
    true
end

.importanceObject



6
7
8
# File 'lib/plugins/hl_plain.rb', line 6

def self.importance
    -100
end

Instance Method Details

#get_highlight_state(buf, y) ⇒ Object



9
10
11
12
# File 'lib/plugins/hl_plain.rb', line 9

def get_highlight_state buf, y
    # we don't need a highlight state....
    nil
end

#highlight_line(buf, line, ypos) {|Curses::COLOR_WHITE, true, line| ... } ⇒ Object

Yields:

  • (Curses::COLOR_WHITE, true, line)


19
20
21
# File 'lib/plugins/hl_plain.rb', line 19

def highlight_line buf, line, ypos
    yield Curses::COLOR_WHITE, true, line if block_given?
end

#should_continue_highlight_pass?(buf, y, state) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/plugins/hl_plain.rb', line 13

def should_continue_highlight_pass? buf, y, state
    false
end