Class: DTK::Network::Client::ModuleRef::Dependency::Remote

Inherits:
DTK::Network::Client::ModuleRef::Dependency show all
Defined in:
lib/client/module_ref/dependency/remote.rb

Instance Attribute Summary

Attributes inherited from DTK::Network::Client::ModuleRef

#explicit_path, #full_name, #name, #namespace, #repo_dir, #version

Instance Method Summary collapse

Methods inherited from DTK::Network::Client::ModuleRef::Dependency

create_local_or_remote, is_local?

Methods included from RestWrapper

#rest_delete, #rest_get, #rest_post

Constructor Details

#initialize(module_info) ⇒ Remote

Returns a new instance of Remote.



5
6
7
8
9
# File 'lib/client/module_ref/dependency/remote.rb', line 5

def initialize(module_info)
  super(name: module_info[:name] || module_info['module'], namespace: module_info[:namespace] || module_info['namespace'])
  version_str = module_info[:version]||module_info['version']
  @version    = ModuleRef::Version.new(version_str)
end

Instance Method Details

#dtkn_versions_with_dependenciesObject



11
12
13
14
# File 'lib/client/module_ref/dependency/remote.rb', line 11

def dtkn_versions_with_dependencies
  response = rest_get("modules/get_versions_with_dependencies", { name: self.name, namespace: self.namespace })
  response['versions']
end