Class: Vx::ServiceConnector::GitlabV6::Files
- Inherits:
-
Struct
- Object
- Struct
- Vx::ServiceConnector::GitlabV6::Files
- Defined in:
- lib/vx/service_connector/gitlab_v6/files.rb
Instance Attribute Summary collapse
-
#repo ⇒ Object
Returns the value of attribute repo.
-
#session ⇒ Object
Returns the value of attribute session.
Instance Method Summary collapse
Instance Attribute Details
#repo ⇒ Object
Returns the value of attribute repo
4 5 6 |
# File 'lib/vx/service_connector/gitlab_v6/files.rb', line 4 def repo @repo end |
#session ⇒ Object
Returns the value of attribute session
4 5 6 |
# File 'lib/vx/service_connector/gitlab_v6/files.rb', line 4 def session @session end |
Instance Method Details
#get(sha, path) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/vx/service_connector/gitlab_v6/files.rb', line 6 def get(sha, path) begin session.get("/projects/#{repo.id}/repository/commits/#{sha}/blob", filepath: path) rescue RequestError => e $stderr.puts "ERROR: #{e.inspect}" nil end end |