Class: DTK::Network::Client::ModuleRef
- Inherits:
-
Object
- Object
- DTK::Network::Client::ModuleRef
- 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
Defined Under Namespace
Classes: Dependency, Version
Instance Attribute Summary collapse
-
#explicit_path ⇒ Object
readonly
Returns the value of attribute explicit_path.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#repo_dir ⇒ Object
readonly
Returns the value of attribute repo_dir.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(module_info) ⇒ ModuleRef
constructor
A new instance of ModuleRef.
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_path ⇒ Object (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_name ⇒ Object (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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/client/module_ref.rb', line 7 def name @name end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
7 8 9 |
# File 'lib/client/module_ref.rb', line 7 def namespace @namespace end |
#repo_dir ⇒ Object (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 |
#version ⇒ Object (readonly)
Returns the value of attribute version.
7 8 9 |
# File 'lib/client/module_ref.rb', line 7 def version @version end |