lib/active_support/deprecation.rb in activesupport-1.4.0 vs lib/active_support/deprecation.rb in activesupport-1.4.1

- old
+ new

@@ -1,9 +1,9 @@ require 'yaml' module ActiveSupport - module Deprecation + module Deprecation #:nodoc: mattr_accessor :debug self.debug = false # Choose the default warn behavior according to RAILS_ENV. # Ignore deprecation warnings in production. @@ -79,11 +79,11 @@ self.behavior = default_behavior # Warnings are not silenced by default. self.silenced = false - module ClassMethods + module ClassMethods #:nodoc: # Declare that a method has been deprecated. def deprecate(*method_names) options = method_names.last.is_a?(Hash) ? method_names.pop : {} method_names = method_names + options.keys method_names.each do |method_name| @@ -110,11 +110,11 @@ def deprecation_horizon '2.0' end end - module Assertions + module Assertions #:nodoc: def assert_deprecated(match = nil, &block) result, warnings = collect_deprecations(&block) assert !warnings.empty?, "Expected a deprecation warning within the block but received none" if match match = Regexp.new(Regexp.escape(match)) unless match.is_a?(Regexp) @@ -143,10 +143,10 @@ end end # Stand-in for @request, @attributes, @params, etc which emits deprecation # warnings on any method call (except #inspect). - class DeprecatedInstanceVariableProxy + class DeprecatedInstanceVariableProxy #:nodoc: instance_methods.each { |m| undef_method m unless m =~ /^__/ } def initialize(instance, method, var = "@#{method}") @instance, @method, @var = instance, method, var end