Module: Weechat::Pointer
Instance Attribute Summary collapse
-
#ptr ⇒ Object
(also: #pointer)
readonly
Returns the value of attribute ptr.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?, #equal?)
- #hash ⇒ Object
- #initialize(ptr) ⇒ Object
- #inspect ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#ptr ⇒ Object (readonly) Also known as: pointer
Returns the value of attribute ptr.
3 4 5 |
# File 'lib/weechat/pointer.rb', line 3 def ptr @ptr end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?, equal?
14 15 16 |
# File 'lib/weechat/pointer.rb', line 14 def ==(other) other.respond_to?(:ptr) and @ptr == other.ptr end |
#hash ⇒ Object
20 21 22 |
# File 'lib/weechat/pointer.rb', line 20 def hash @ptr.hash end |
#initialize(ptr) ⇒ Object
10 11 12 |
# File 'lib/weechat/pointer.rb', line 10 def initialize(ptr) @ptr = ptr end |
#inspect ⇒ Object
24 25 26 |
# File 'lib/weechat/pointer.rb', line 24 def inspect sprintf "#<%s:0x%x @ptr=%p>", self.class, object_id << 1, @ptr end |
#to_s ⇒ Object
6 7 8 |
# File 'lib/weechat/pointer.rb', line 6 def to_s @ptr end |