Sha256: f210f16dc3aec94d96d1dd2cd4a6c5639f5433b487d630165f3974344630b83c
Contents?: true
Size: 797 Bytes
Versions: 21
Compression:
Stored size: 797 Bytes
Contents
# encoding: utf-8 module BitBucket DEPRECATION_PREFIX = "[BitBucketAPI] Deprecation warning:" class << self attr_writer :deprecation_tracker def deprecation_tracker @deprecation_tracker ||= [] end # Displays deprecation message to the user. # Each message is printed once. def deprecate(method, alternate_method=nil) return if deprecation_tracker.include? method deprecation_tracker << method message = <<-NOTICE #{DEPRECATION_PREFIX} * #{method} is deprecated. NOTICE if alternate_method message << <<-ADDITIONAL * please use #{alternate_method} instead. ADDITIONAL end warn_deprecation(message) end def warn_deprecation(message) send :warn, message end end end # BitBucket
Version data entries
21 entries across 21 versions & 5 rubygems