11# encoding: utf-8
22
3- require 'github_api/configuration'
4- require 'github_api/mime_type'
5- require 'github_api/rate_limit'
6- require 'github_api/core_ext/hash'
7- require 'github_api/core_ext/array'
8- require 'github_api/null_encoder'
9-
10- require 'github_api/request/verbs'
11-
12- require 'github_api/api/actions'
13- require 'github_api/api/factory'
14- require 'github_api/api/arguments'
3+ require_relative 'authorization'
4+ require_relative 'api/actions'
5+ require_relative 'api/factory'
6+ require_relative 'api/arguments'
7+ require_relative 'configuration'
8+ require_relative 'constants'
9+ require_relative 'mime_type'
10+ require_relative 'null_encoder'
11+ require_relative 'rate_limit'
12+ require_relative 'request/verbs'
13+ require_relative 'validations'
1514
1615module Github
1716 # Core class responsible for api interface operations
1817 class API
19- extend Github ::ClassMethods
20-
2118 include Constants
2219 include Authorization
2320 include MimeType
24- include Request ::Verbs
2521 include RateLimit
22+ include Request ::Verbs
2623
2724 attr_reader ( *Github . configuration . property_names )
2825
@@ -40,6 +37,22 @@ class API
4037 end
4138 end
4239
40+ # Requires internal libraries
41+ #
42+ # @param [String] prefix
43+ # the relative path prefix
44+ # @param [Array[String]] libs
45+ # the array of libraries to require
46+ #
47+ # @return [self]
48+ #
49+ # @api public
50+ def self . require_all ( prefix , *libs )
51+ libs . each do |lib |
52+ require "#{ File . join ( prefix , lib ) } "
53+ end
54+ end
55+
4356 # Create new API
4457 #
4558 # @api public
@@ -253,6 +266,10 @@ def method_missing(method_name, *args, &block) # :nodoc:
253266 end
254267 end
255268
269+ def respond_to? ( method_name , include_private = false )
270+ method_name . to_s . start_with? ( 'clear_' ) || super
271+ end
272+
256273 # Acts as setter and getter for api requests arguments parsing.
257274 #
258275 # Returns Arguments instance.
0 commit comments