Class: MGit::OpenApi::ScriptDownloadInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/m-git/open_api/script_download_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repo_name, repo_path, result, output, progress) ⇒ ScriptDownloadInfo

Returns a new instance of ScriptDownloadInfo.



28
29
30
31
32
33
34
# File 'lib/m-git/open_api/script_download_info.rb', line 28

def initialize(repo_name, repo_path, result, output, progress)
  @repo_name = repo_name
  @repo_path = repo_path
  @result = result
  @output = output
  @progress = progress
end

Instance Attribute Details

#outputObject (readonly)

String

执行输出,若出错,该变量保存出错信息,可能为nil



23
24
25
# File 'lib/m-git/open_api/script_download_info.rb', line 23

def output
  @output
end

#progressObject (readonly)

Float

当前仓库在整个下载任务中所处进度(如10个任务,当前第5个下载完,则progress=0.5),并非单仓库下载进度。



26
27
28
# File 'lib/m-git/open_api/script_download_info.rb', line 26

def progress
  @progress
end

#repo_nameObject (readonly)

String

下载仓库名



14
15
16
# File 'lib/m-git/open_api/script_download_info.rb', line 14

def repo_name
  @repo_name
end

#repo_pathObject (readonly)

String

下载仓库本地地址



17
18
19
# File 'lib/m-git/open_api/script_download_info.rb', line 17

def repo_path
  @repo_path
end

#resultObject (readonly)

OpenApi::DOWNLOAD_RESULT

下载结果



20
21
22
# File 'lib/m-git/open_api/script_download_info.rb', line 20

def result
  @result
end