Class: Weechat::CustomFreeContentBuffer

Inherits:
CustomBuffer
  • Object
show all
Defined in:
lib/weechat/custom_free_content_buffer.rb

Overview

Override to create a custom buffer with free content. These buffers don't work on a line basis (so methods such as puts won't work). They work by setting specific lines, which can be done with the print_line method

Instance Method Summary collapse

Methods inherited from CustomBuffer

#__getobj__, #buffer_closed, #handle_input

Constructor Details

#initialize(name) ⇒ CustomFreeContentBuffer



9
10
11
12
# File 'lib/weechat/custom_free_content_buffer.rb', line 9

def initialize(name)
  super
  self.type = :free
end

Instance Method Details

This method returns an undefined value.

Sets a given line in the buffer



19
20
21
# File 'lib/weechat/custom_free_content_buffer.rb', line 19

def print_line(line_number, line)
  Weechat.print_y(self.ptr, line_number, line)
end