# File lib/will_paginate/deprecation.rb, line 23 def initialize(values = {}) super() update values @deprecated = {} end
# File lib/will_paginate/deprecation.rb, line 29 def []=(key, value) check_deprecated(key, value) super end
# File lib/will_paginate/deprecation.rb, line 34 def deprecate_key(*keys) message = block_given? ? Proc.new : keys.pop Array(keys).each { |key| @deprecated[key] = message } end
# File lib/will_paginate/deprecation.rb, line 39 def merge(another) to_hash.update(another) end
# File lib/will_paginate/deprecation.rb, line 43 def to_hash ::Hash.new.update(self) end
# File lib/will_paginate/deprecation.rb, line 49 def check_deprecated(key, value) if msg = @deprecated[key] and (!msg.respond_to?(:call) or (msg = msg.call(key, value))) WillPaginate::Deprecation.warn(msg) end end