Class: NexusAPI::Download

Inherits:
Thor
  • Object
show all
Includes:
CLIUtils
Defined in:
lib/nexus_api/cli_commands/download.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CLIUtils

#if_file_exists?, #print_element, #print_paginating_set, #print_set, #repository_set?, #set, #setup

Instance Attribute Details

#apiObject

Returns the value of attribute api.



3
4
5
# File 'lib/nexus_api/cli_commands/download.rb', line 3

def api
  @api
end

Instance Method Details

#dockerObject



10
11
12
13
# File 'lib/nexus_api/cli_commands/download.rb', line 10

def docker
  setup
  @api.download_docker_component(image: options[:image], tag: options[:docker_tag])
end

#fileObject



18
19
20
21
# File 'lib/nexus_api/cli_commands/download.rb', line 18

def file
  setup
  @api.download(id: options[:nexus_id], name: options[:new_name])
end