Class: Dor::ReleaseTags::Purl
- Inherits:
-
Object
- Object
- Dor::ReleaseTags::Purl
- Defined in:
- lib/dor/release_tags/purl.rb
Instance Method Summary collapse
-
#initialize(pid:, purl_host:) ⇒ Purl
constructor
Determine projects in which an item is released.
-
#released_for(new_tags) ⇒ Hash{String => Boolean}
This function calls purl and gets a list of all release tags currently in purl.
Constructor Details
#initialize(pid:, purl_host:) ⇒ Purl
Determine projects in which an item is released
8 9 10 11 |
# File 'lib/dor/release_tags/purl.rb', line 8 def initialize(pid:, purl_host:) @pid = pid @purl_host = purl_host end |
Instance Method Details
#released_for(new_tags) ⇒ Hash{String => Boolean}
This function calls purl and gets a list of all release tags currently in purl. It then compares to the list you have generated. Any tag that is on purl, but not in the newly generated list is added to the new list with a value of false.
17 18 19 20 21 22 23 |
# File 'lib/dor/release_tags/purl.rb', line 17 def released_for() = .map(&:downcase) - .keys.map(&:downcase) .each do |missing_tag| [missing_tag.capitalize] = { 'release' => false } end end |