Class: DGD::Manifest::GoodsSpec

Inherits:
Object
  • Object
show all
Defined in:
lib/dgd-tools/manifest.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dependenciesObject (readonly)

Returns the value of attribute dependencies.



401
402
403
# File 'lib/dgd-tools/manifest.rb', line 401

def dependencies
  @dependencies
end

#nameObject (readonly)

Returns the value of attribute name.



397
398
399
# File 'lib/dgd-tools/manifest.rb', line 397

def name
  @name
end

#pathsObject (readonly)

Returns the value of attribute paths.



400
401
402
# File 'lib/dgd-tools/manifest.rb', line 400

def paths
  @paths
end

#repoObject (readonly)

Returns the value of attribute repo.



396
397
398
# File 'lib/dgd-tools/manifest.rb', line 396

def repo
  @repo
end

#sourceObject (readonly)

Returns the value of attribute source.



398
399
400
# File 'lib/dgd-tools/manifest.rb', line 398

def source
  @source
end

#source_detailsObject (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