Class: Weechat::Hooks::Print
- Inherits:
-
Weechat::Hook
- Object
- Weechat::Hook
- Weechat::Hooks::Print
- Defined in:
- lib/weechat/hooks/print.rb
Instance Attribute Summary
Attributes inherited from Weechat::Hook
Attributes included from Pointer
Instance Method Summary collapse
-
#initialize(buffer = '*', tags = [], message = '', strip_colors = false, &callback) ⇒ Print
constructor
A new instance of Print.
Methods inherited from Weechat::Hook
#call, compute_free_id, find_by_id, #hooked?, hooks, inherited, init, register, #unhook, unhook, unhook_all, unregister
Methods included from Pointer
Constructor Details
#initialize(buffer = '*', tags = [], message = '', strip_colors = false, &callback) ⇒ Print
Returns a new instance of Print.
4 5 6 7 8 9 10 11 |
# File 'lib/weechat/hooks/print.rb', line 4 def initialize(buffer='*', = [], = '', strip_colors = false, &callback) super buffer = buffer.ptr if buffer.respond_to?(:ptr) = .join(",") strip_colors = Weechat.bool_to_integer(strip_colors) @callback = EvaluatedCallback.new(callback) @ptr = Weechat.hook_print(buffer, , , strip_colors, "print_callback", id.to_s) end |