Sha256: 4f9f378768e4714551c8e13570d5602d75cea03b4e24c3558c84ed247749fe8a

Contents?: true

Size: 507 Bytes

Versions: 4

Compression:

Stored size: 507 Bytes

Contents

require 'adhearsion/logging'

class Object
  def pb_logger
    logger
  end

  def logger_id
    self
  end

  def method_missing(method_id, *arguments, &block)
    if method_id == Adhearsion::Logging::METHOD
      self.class.send :define_method, method_id do
        Logging.logger[logger_id]
      end
      Logging.logger[logger_id]
    else
      super
    end
  end

  def respond_to?(method_id, include_private = false)
    return true if method_id == Adhearsion::Logging::METHOD

    super
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
adhearsion-2.0.0.beta1 lib/adhearsion/foundation/object.rb
adhearsion-2.0.0.alpha3 lib/adhearsion/foundation/object.rb
adhearsion-2.0.0.alpha2 lib/adhearsion/foundation/object.rb
adhearsion-2.0.0.alpha1 lib/adhearsion/foundation/object.rb