Class: OverdriveMetadata::EAudioBook

Inherits:
ERecord
  • Object
show all
Defined in:
lib/overdrive_metadata.rb

Constant Summary

Constants inherited from ERecord

OverdriveMetadata::ERecord::DATE_ERR, OverdriveMetadata::ERecord::FIXF_ERR, OverdriveMetadata::ERecord::GMD, OverdriveMetadata::ERecord::TITL_ERR

Instance Attribute Summary collapse

Attributes inherited from ERecord

#record

Instance Method Summary collapse

Methods inherited from ERecord

#make_control_field, #make_data_field, #make_fixed_field, #make_publication, #make_title, #non_filing_characters

Constructor Details

#initializeEAudioBook

Returns a new instance of EAudioBook.



308
309
310
311
312
313
314
# File 'lib/overdrive_metadata.rb', line 308

def initialize
  super
  @ldr[6]  = 'i'
  @fixed_field = '      s        xxunnnn s           eng d'
  @isbn = '(sound recording : OverDrive Audio Book)'
  @subject = 'Downloadable audiobooks.'
end

Instance Attribute Details

#isbnObject (readonly)

Returns the value of attribute isbn.



306
307
308
# File 'lib/overdrive_metadata.rb', line 306

def isbn
  @isbn
end

#subjectObject (readonly)

Returns the value of attribute subject.



306
307
308
# File 'lib/overdrive_metadata.rb', line 306

def subject
  @subject
end

Instance Method Details

#make_006Object



316
317
318
# File 'lib/overdrive_metadata.rb', line 316

def make_006
  make_control_field('006', 'm        h        ')
end

#make_007Object



320
321
322
323
# File 'lib/overdrive_metadata.rb', line 320

def make_007
  make_control_field('007', 'sz usnnnnnnned')
  make_control_field('007', 'cr nna   |||||')
end

#make_physical(hours, minutes) ⇒ Object



325
326
327
328
# File 'lib/overdrive_metadata.rb', line 325

def make_physical(hours, minutes)
  return nil if hours.empty? or minutes.empty?
  make_data_field('300', ' ', ' ', {'a' => "1 sound file (ca. #{hours} hr., #{minutes} min.) :", 'b' => 'digital.'})
end