Sha256: dd5ed55f5149a138554a3619177aa3b86b1abc2f6b3a0bd92e6ab839d5d49c6d
Contents?: true
Size: 774 Bytes
Versions: 73
Compression:
Stored size: 774 Bytes
Contents
# encoding: utf-8 module Github DEPRECATION_PREFIX = "[GithubAPI] 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 # Github
Version data entries
73 entries across 73 versions & 3 rubygems