module Flatten::Deprecations

Public Class Methods

deprecate(message, target) click to toggle source
# File lib/flatten/deprecations.rb, line 8
def deprecate(message, target)
        @deprecations ||= Set.new
        msg = "Flatten: #{message} is deprecated " +
                "and will be removed in #{target} (at #{external_callpoint})"
        warn(msg) if @deprecations.add?(msg)
end

Private Class Methods

external_callpoint() click to toggle source
# File lib/flatten/deprecations.rb, line 17
def external_callpoint
        caller.drop_while { |loc| loc['lib/flatten/'] }.first
end

Private Instance Methods

deprecate(message, target) click to toggle source
# File lib/flatten/deprecations.rb, line 24
def deprecate(message, target)
        Deprecations.deprecate(message, target)
end