Class: GitLabBuildOutput::GitLabApi

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab_build_output/gitlab_api.rb

Defined Under Namespace

Classes: Status

Instance Method Summary collapse

Constructor Details

#initialize(endpoint, private_token) ⇒ GitLabApi

Returns a new instance of GitLabApi.



23
24
25
26
# File 'lib/gitlab_build_output/gitlab_api.rb', line 23

def initialize(endpoint, private_token)
  @client ||=
    Gitlab.client(endpoint: endpoint, private_token: private_token)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/gitlab_build_output/gitlab_api.rb', line 28

def method_missing(method, *args, &block)
  if @client.respond_to?(method)
    @client.public_send(method, *args, &block)
  else
    super
  end
end

Instance Method Details

#respond_to_missing?(*args) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/gitlab_build_output/gitlab_api.rb', line 36

def respond_to_missing?(*args)
  @client.respond_to_missing(*args)
end