Class: Vx::ServiceConnector::GitlabV6::Repos

Inherits:
Struct
  • Object
show all
Defined in:
lib/vx/service_connector/gitlab_v6/repos.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#sessionObject

Returns the value of attribute session

Returns:

  • (Object)

    the current value of session



4
5
6
# File 'lib/vx/service_connector/gitlab_v6/repos.rb', line 4

def session
  @session
end

Instance Method Details

#to_aObject



6
7
8
9
10
11
12
13
14
# File 'lib/vx/service_connector/gitlab_v6/repos.rb', line 6

def to_a
  begin
    session.get("/projects", per_page: 30).map do |proj|
      proj_to_model proj
    end
  rescue RequestError
    []
  end
end