class Alephant::Logger::Base
Attributes
drivers[R]
Public Class Methods
new(drivers)
click to toggle source
# File lib/alephant/logger/base.rb, line 6 def initialize(drivers) @drivers = drivers unless drivers.any? { |driver| driver.is_a? Alephant::Logger::JSON } drivers << Alephant::Logger::JSON.new("app.log") end end
Public Instance Methods
method_missing(name, *args)
click to toggle source
# File lib/alephant/logger/base.rb, line 18 def method_missing(name, *args) drivers.each do |driver| driver.send(name, *args) if driver.respond_to? name end end
respond_to?(name)
click to toggle source
Calls superclass method
# File lib/alephant/logger/base.rb, line 24 def respond_to?(name) drivers.any? do |driver| driver.respond_to?(name) || super end end
write(*args)
click to toggle source
# File lib/alephant/logger/base.rb, line 14 def write(*args) self.<< *args end