module Github
def deprecate(method, alternate_method=nil)
Displays deprecation message to the user.
def deprecate(method, alternate_method=nil) return if deprecation_tracker.include? method deprecation_tracker << method message = <<-NOTICE PRECATION_PREFIX} method} is deprecated. CE if alternate_method message << <<-ADDITIONAL ease use #{alternate_method} instead. TIONAL end warn_deprecation(message) end
def deprecation_tracker
def deprecation_tracker @deprecation_tracker ||= [] end
def method_missing(method, *args, &block)
Delegate to Github::Client
def method_missing(method, *args, &block) return super unless new.respond_to?(method) new.send(method, *args, &block) end
def new(options = {}, &block)
-
(Github::Client)
-
def new(options = {}, &block) @api_client = Github::Client.new(options, &block) end
def respond_to?(method, include_private = false)
def respond_to?(method, include_private = false) new.respond_to?(method, include_private) || super(method, include_private) end
def warn_deprecation(message)
def warn_deprecation(message) send :warn, message end