Module: Weechat::Pointer

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

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

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

#hashObject



28
29
30
# File 'lib/weechat/pointer.rb', line 28

def hash
  @ptr.hash
end

#inspectObject



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_sObject



18
19
20
# File 'lib/weechat/pointer.rb', line 18

def to_s
  @ptr
end