Class: DTK::Network::Client::ModuleRef

Inherits:
Object
  • Object
show all
Defined in:
lib/client/module_ref.rb,
lib/client/module_ref/version.rb,
lib/client/module_ref/dependency.rb,
lib/client/module_ref/version/source.rb,
lib/client/module_ref/dependency/local.rb,
lib/client/module_ref/dependency/remote.rb

Direct Known Subclasses

Dependency

Defined Under Namespace

Classes: Dependency, Version

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(module_info) ⇒ ModuleRef

Returns a new instance of ModuleRef.



9
10
11
12
13
14
15
16
17
# File 'lib/client/module_ref.rb', line 9

def initialize(module_info)
  @name            = module_info[:name]
  @namespace       = module_info[:namespace]
  mod_info_version = module_info[:version] || module_info['version']
  @version         = mod_info_version ? Version.new(mod_info_version) : nil
  @repo_dir        = module_info[:repo_dir]
  @explicit_path   = module_info[:explicit_path]
  @full_name       = "#{@namespace}/#{@name}"
end

Instance Attribute Details

#explicit_pathObject (readonly)

Returns the value of attribute explicit_path.



7
8
9
# File 'lib/client/module_ref.rb', line 7

def explicit_path
  @explicit_path
end

#full_nameObject (readonly)

Returns the value of attribute full_name.



7
8
9
# File 'lib/client/module_ref.rb', line 7

def full_name
  @full_name
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/client/module_ref.rb', line 7

def name
  @name
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



7
8
9
# File 'lib/client/module_ref.rb', line 7

def namespace
  @namespace
end

#repo_dirObject (readonly)

Returns the value of attribute repo_dir.



7
8
9
# File 'lib/client/module_ref.rb', line 7

def repo_dir
  @repo_dir
end

#versionObject (readonly)

Returns the value of attribute version.



7
8
9
# File 'lib/client/module_ref.rb', line 7

def version
  @version
end