Module: Weechat::Pointer

Included in:
Buffer, Hook, IRC::Channel, Plugin, Script, Window
Defined in:
lib/weechat/pointer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ptrObject (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

#hashObject



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

#inspectObject



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_sObject



6
7
8
# File 'lib/weechat/pointer.rb', line 6

def to_s
  @ptr
end