Class: Weechat::IRC::Query

Inherits:
Channel
  • Object
show all
Defined in:
lib/weechat/irc/channel.rb

Overview

Channel

Instance Attribute Summary

Attributes inherited from Channel

#name, #server

Attributes included from Pointer

#ptr

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Channel

#==, #buffer, #command, #get_infolist, #initialize, #join, #joined?, #nicks, #part, #ptr, #rejoin, #send

Methods included from Properties::ClassMethods

#all, #apply_rtransformation, #apply_transformation, #init_properties, #known_integer_properties, #known_properties, #known_string_properties, #mappings, #rtransformations, #settable_properties, #transformations, #type

Methods included from Pointer

#==, #hash, included, #inspect, #to_s

Constructor Details

This class inherits a constructor from Weechat::IRC::Channel

Class Method Details

.allObject



136
137
138
# File 'lib/weechat/irc/channel.rb', line 136

def all
  Weechat::Buffer.all.select {|b| b.query?}.map{|b| b.query}
end

.find(server, nick) ⇒ Object



140
141
142
143
144
145
146
147
# File 'lib/weechat/irc/channel.rb', line 140

def find(server, nick)
  server  = server.name if server.respond_to?(:name)
  nick    = nick.name if nick.respond_to?(:name)
  b = Weechat::Buffer.find("#{server}.#{nick}", "irc")
  if b
    b.query
  end
end

Instance Method Details

#recipientObject

eigenclass



150
151
152
# File 'lib/weechat/irc/channel.rb', line 150

def recipient
  self.name
end