Sha256: 2e3fd01ae5c52d580fb9f4f32a8d398ee56fa385504ffc76449888ca383203b3

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

module IRC
  class Event
    attr_accessor :server, :prefix, :command, :params
  
    def initialize(server, prefix, command, params)
      @server = server
      @prefix = prefix
      @command = command
      @params = params
    end
    
    
  end
end


module Kernel
 # Like instance_eval but allows parameters to be passed.
  def instance_exec(*args, &block)
    mname = "__instance_exec_#{Thread.current.object_id.abs}_#{object_id.abs}"
    Object.class_eval{ define_method(mname, &block) }
    begin
      ret = send(mname, *args)
    ensure
      Object.class_eval{ undef_method(mname) } rescue nil
    end
    ret
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
on_irc-2.0.0 lib/on_irc/event.rb