Sha256: 25c5f739feb68586af38d2882debc7a47794cf4c20b3d2dc6f14ba84757bd07f

Contents?: true

Size: 444 Bytes

Versions: 117

Compression:

Stored size: 444 Bytes

Contents

# Adds the 'around_level' method to Logger.

class Logger
  def self.define_around_helper(level)
    module_eval <<-end_eval
      def around_#{level}(before_message, after_message, &block)
        self.#{level}(before_message)
        return_value = block.call(self)
        self.#{level}(after_message)
        return return_value
      end
    end_eval
  end
  [:debug, :info, :error, :fatal].each {|level| define_around_helper(level) }

end

Version data entries

117 entries across 117 versions & 12 rubygems

Version Path
3mix-castronaut-0.5.0.2 vendor/activesupport/lib/active_support/core_ext/logger.rb
masover-castronaut-0.4.4.4 vendor/activesupport/lib/active_support/core_ext/logger.rb
masover-castronaut-0.4.4.5 vendor/activesupport/lib/active_support/core_ext/logger.rb
masover-castronaut-0.5.0.1 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.4.1 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.4.2 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.4.3 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.4.4 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.4.5 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.4.6 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.5.0 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.5.1 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.5.2 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.5.3 vendor/activesupport/lib/active_support/core_ext/logger.rb
relevance-castronaut-0.5.4 vendor/activesupport/lib/active_support/core_ext/logger.rb
radiant-0.7.2 vendor/rails/activesupport/lib/active_support/core_ext/logger.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activesupport/lib/active_support/core_ext/logger.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activesupport/lib/active_support/core_ext/logger.rb
activesupport-1.3.0 lib/active_support/core_ext/logger.rb
activesupport-1.4.3 lib/active_support/core_ext/logger.rb