module CallLogger

Constants

VERSION

Attributes

configuration[RW]

Public Class Methods

configure() { |configuration| ... } click to toggle source
# File lib/call_logger.rb, line 18
def self.configure
  self.configuration ||= Configuration.new
  yield(configuration) if block_given?
end
included(base) click to toggle source
# File lib/call_logger.rb, line 10
def self.included(base)
  base.extend(ClassMethods)
end
log_block(name, &block) click to toggle source
# File lib/call_logger.rb, line 28
def self.log_block(name, &block)
  logger = configuration.logger
  formatter = configuration.formatter
  call_wrapper = CallWrapper.new(
    logger: logger, formatter: formatter
  )
  call_wrapper.call(name, [], &block)
end

Public Instance Methods

log_block(name, &block) click to toggle source
# File lib/call_logger.rb, line 24
def log_block(name, &block)
  self.class.log_block(name, &block)
end