Class: Amun::UI::ModeLineSegments::BufferName

Inherits:
Object
  • Object
show all
Defined in:
lib/amun/ui/mode_line_segments/buffer_name.rb

Overview

display buffer name in modeline

Instance Method Summary collapse

Constructor Details

#initialize(buffer) ⇒ BufferName

Returns a new instance of BufferName.



6
7
8
# File 'lib/amun/ui/mode_line_segments/buffer_name.rb', line 6

def initialize(buffer)
  @buffer = buffer
end

Instance Method Details

#renderObject



10
11
12
# File 'lib/amun/ui/mode_line_segments/buffer_name.rb', line 10

def render(*)
  "#{@buffer.name} ".colorize(:mode_line)
end