Module: Rlyeh::Sender

Included in:
Connection
Defined in:
lib/rlyeh/sender.rb

Instance Method Summary collapse

Instance Method Details

#send_message(command, *args) ⇒ Object



7
8
9
10
# File 'lib/rlyeh/sender.rb', line 7

def send_message(command, *args)
  options = Rlyeh::Utils.extract_options! args
  send_data Ircp::Message.new(*args, options.merge(:command => command))
end

#send_numeric_reply(type, target, *args) ⇒ Object



12
13
14
15
16
# File 'lib/rlyeh/sender.rb', line 12

def send_numeric_reply(type, target, *args)
  options = Rlyeh::Utils.extract_options! args
  numeric = Rlyeh::NumericReply.to_value type
  send_data Ircp::Message.new(target, *args, options.merge(:command => numeric))
end