Default middleware stack that uses default adapter as specified by configuration setup
@return [Proc]
@api private
# File lib/github_api.rb, line 41 def default_middleware(options = {}) Middleware.default(options) end
Displays deprecation message to the user. Each message is printed once.
# File lib/github_api/deprecation.rb, line 16 def deprecate(method, alternate_method=nil) return if deprecation_tracker.include? method deprecation_tracker << method message = #{DEPRECATION_PREFIX}* #{method} is deprecated. if alternate_method message << * please use #{alternate_method} instead. end warn_deprecation(message) end
# File lib/github_api/deprecation.rb, line 10 def deprecation_tracker @deprecation_tracker ||= [] end
# File lib/github_api.rb, line 19 def included(base) base.extend ClassMethods end
Delegate to Github::Client
@api private
# File lib/github_api.rb, line 48 def method_missing(method_name, *args, &block) if new.respond_to?(method_name) new.send(method_name, *args, &block) elsif configuration.respond_to?(method_name) Github.configuration.send(method_name, *args, &block) else super end end
Alias for Github::Client.new
@param [Hash] options
the configuration options
@return [Github::Client]
@api public
# File lib/github_api.rb, line 31 def new(options = {}, &block) Client.new(options, &block) end
Generated with the Darkfish Rdoc Generator 2.