Class: DGD::Manifest::GoodsSpec
- Inherits:
-
Object
- Object
- DGD::Manifest::GoodsSpec
- Defined in:
- lib/dgd-tools/manifest.rb
Instance Attribute Summary collapse
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#source_details ⇒ Object
readonly
Returns the value of attribute source_details.
Instance Method Summary collapse
-
#initialize(repo, name:, source:, source_details: {}, paths:, dependencies:) ⇒ GoodsSpec
constructor
A new instance of GoodsSpec.
Constructor Details
#initialize(repo, name:, source:, source_details: {}, paths:, dependencies:) ⇒ GoodsSpec
Returns a new instance of GoodsSpec.
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/dgd-tools/manifest.rb', line 403 def initialize(repo, name:, source:, source_details: {}, paths:, dependencies:) @repo = repo @name = name @source = source @source_details = source_details cleaned_paths = {} paths.each do |k, v| # Remove leading and trailing slashes cleaned_paths[k.gsub(/^\//, "").chomp("/")] = v.gsub(/^\//, "").chomp("/") end @paths = cleaned_paths @dependencies = dependencies end |
Instance Attribute Details
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
401 402 403 |
# File 'lib/dgd-tools/manifest.rb', line 401 def dependencies @dependencies end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
397 398 399 |
# File 'lib/dgd-tools/manifest.rb', line 397 def name @name end |
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
400 401 402 |
# File 'lib/dgd-tools/manifest.rb', line 400 def paths @paths end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
396 397 398 |
# File 'lib/dgd-tools/manifest.rb', line 396 def repo @repo end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
398 399 400 |
# File 'lib/dgd-tools/manifest.rb', line 398 def source @source end |
#source_details ⇒ Object (readonly)
Returns the value of attribute source_details.
399 400 401 |
# File 'lib/dgd-tools/manifest.rb', line 399 def source_details @source_details end |