Module: Weechat::Pointer
- Defined in:
- lib/weechat/pointer.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#ptr ⇒ Object
(also: #pointer)
readonly
Returns the value of attribute ptr.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?, #equal?)
- #hash ⇒ Object
- #inspect ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#ptr ⇒ Object (readonly) Also known as: pointer
Returns the value of attribute ptr.
15 16 17 |
# File 'lib/weechat/pointer.rb', line 15 def ptr @ptr end |
Class Method Details
.included(by) ⇒ Object
11 12 13 |
# File 'lib/weechat/pointer.rb', line 11 def self.included(by) by.extend Weechat::Pointer::ClassMethods end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?, equal?
22 23 24 |
# File 'lib/weechat/pointer.rb', line 22 def ==(other) other.respond_to?(:ptr) and @ptr == other.ptr end |
#hash ⇒ Object
28 29 30 |
# File 'lib/weechat/pointer.rb', line 28 def hash @ptr.hash end |
#inspect ⇒ Object
32 33 34 |
# File 'lib/weechat/pointer.rb', line 32 def inspect sprintf "#<%s:0x%x @ptr=%p>", self.class, object_id << 1, @ptr end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/weechat/pointer.rb', line 18 def to_s @ptr end |