Class: Weechat::Info
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Hook
Attributes included from Pointer
Instance Method Summary collapse
-
#initialize(name, description, &callback) ⇒ Info
constructor
A new instance of Info.
Methods inherited from 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(name, description, &callback) ⇒ Info
Returns a new instance of Info.
5 6 7 8 9 10 |
# File 'lib/weechat/info.rb', line 5 def initialize(name, description, &callback) super @name, @description = name, description @callback = callback @ptr = Weechat.hook_info(name, description, "info_callback", id.to_s) end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/weechat/info.rb', line 4 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/weechat/info.rb', line 3 def name @name end |