Method: Cnvrg::Files#initialize

Defined in:
lib/cnvrg/files.rb

#initialize(owner, project_slug, project_home: '', project: nil, progressbar: nil, cli: nil, options: {}) ⇒ Files

Returns a new instance of Files.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/cnvrg/files.rb', line 15

def initialize(owner, project_slug, project_home: '', project: nil, progressbar: nil, cli: nil, options: {})
  @project_slug = project_slug
  @owner = owner
  @base_resource = "users/#{owner}/projects/#{project_slug}/"
  @project_home = project_home.presence || Cnvrg::CLI.get_project_home
  @project = project
  @client = nil
  if @project.present?
    @client = @project.get_storage_client
  end
  @progressbar = progressbar
  @custom_progess = false
  @cli = cli
  @options = options
end