Class: Gitlab::API
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Request
#endpoint, #pat_prefix, #private_token
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ API
constructor
Creates a new API.
Methods inherited from Request
decode, parse, #request_defaults, #validate
Constructor Details
#initialize(options = {}) ⇒ API
Creates a new API. rubocop:disable Lint/MissingSuper
14 15 16 17 18 19 20 21 |
# File 'lib/gitlab/api.rb', line 14 def initialize( = {}) = Gitlab..merge() (Configuration::VALID_OPTIONS_KEYS + [:auth_token]).each do |key| send("#{key}=", [key]) if [key] end request_defaults(sudo) self.class.headers 'User-Agent' => user_agent end |