Class: Amun::UI::ModeLineSegments::BufferName
- Inherits:
-
Object
- Object
- Amun::UI::ModeLineSegments::BufferName
- Defined in:
- lib/amun/ui/mode_line_segments/buffer_name.rb
Overview
display buffer name in modeline
Instance Method Summary collapse
-
#initialize(buffer) ⇒ BufferName
constructor
A new instance of BufferName.
- #render ⇒ Object
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
#render ⇒ Object
10 11 12 |
# File 'lib/amun/ui/mode_line_segments/buffer_name.rb', line 10 def render(*) "#{@buffer.name} ".colorize(:mode_line) end |