Class: CDMBL::OaiDeletables

Inherits:
Object
  • Object
show all
Defined in:
lib/cdmbl/oai_deletables.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifiers: [], prefix: '', oai_client: OaiClient.new, oai_record_klass: OaiGetRecord) ⇒ OaiDeletables

Returns a new instance of OaiDeletables.



5
6
7
8
9
10
11
12
13
# File 'lib/cdmbl/oai_deletables.rb', line 5

def initialize(identifiers: [],
               prefix: '',
               oai_client: OaiClient.new,
               oai_record_klass: OaiGetRecord)
  @identifiers       = identifiers
  @prefix            = prefix
  @oai_client        = oai_client
  @oai_record_klass  = oai_record_klass
end

Instance Attribute Details

#identifiersObject (readonly)

Returns the value of attribute identifiers.



4
5
6
# File 'lib/cdmbl/oai_deletables.rb', line 4

def identifiers
  @identifiers
end

#oai_clientObject (readonly)

Returns the value of attribute oai_client.



4
5
6
# File 'lib/cdmbl/oai_deletables.rb', line 4

def oai_client
  @oai_client
end

#oai_record_klassObject (readonly)

Returns the value of attribute oai_record_klass.



4
5
6
# File 'lib/cdmbl/oai_deletables.rb', line 4

def oai_record_klass
  @oai_record_klass
end

#prefixObject (readonly)

Returns the value of attribute prefix.



4
5
6
# File 'lib/cdmbl/oai_deletables.rb', line 4

def prefix
  @prefix
end

Instance Method Details

#deletablesObject



15
16
17
18
19
# File 'lib/cdmbl/oai_deletables.rb', line 15

def deletables
  identifiers.select do |id|
    record_missing? to_oai_id(id)
  end
end