lib/boty/dsl.rb in boty-0.1.0 vs lib/boty/dsl.rb in boty-0.1.1
- old
+ new
@@ -5,17 +5,17 @@
include Boty::Logger
INSTANCES = {}
private_constant :INSTANCES
class << self
- alias original_constructor new
+ alias_method :original_constructor, :new
end
attr_accessor :bot
extend Forwardable
- def_delegators :bot, :desc, :respond, :name, :brain, :know_how, :im, :say,
- :match
+ def_delegators :bot,
+ :desc, :respond, :name, :brain, :know_how, :im, :say, :match
def_delegators :message, :user, :channel
def self.new(bot)
INSTANCES[bot] ||= original_constructor bot
end