lib/marc_cleanup/fixed_fields.rb
# Uses same methods as the specific 008 methods
Uses same methods as the specific 008 methods
Uses same methods as the specific 008 methods
def bad_006?(record)
    fields = record.fields('006')
    return false if fields.empty?
    fields.each do |field|
      return true if field.value.length != 18
      rec_type = field.value[0]
      specific_006 = field.value[1..-1]
      case rec_type
      when 'a', 't'
        return true if book_008(specific_006)
      when 'm'
        return true if comp_008(specific_006)
      when 'w', 'f'
        return true if map_008(specific_006)
      when 'c', 'd', 'i', 'j'
        return true if music_008(specific_006)
      when 's'
        return true if continuing_resource_008(specific_006)
      when 'w', 'g', 'k', 'o', 'r'
        return true if visual_008(specific_006)
      when 'p'
        return true if mix_mat_008(specific_006)
      end
    end
    false
  end
def bad_006? ( record ) fields = record . fields ( '006' ) return false if fields . empty? fields . each do | field | return true if field . value . length != 18 rec_type = field . value [ 0 ] specific_006 = field . value [ 1 .. - 1 ] case rec_type when 'a' , 't' return true if book_008 ( specific_006 ) when 'm' return true if comp_008 ( specific_006 ) when 'w' , 'f' return true if map_008 ( specific_006 ) when 'c' , 'd' , 'i' , 'j' return true if music_008 ( specific_006 ) when 's' return true if continuing_resource_008 ( specific_006 ) when 'w' , 'g' , 'k' , 'o' , 'r' return true if visual_008 ( specific_006 ) when 'p' return true if mix_mat_008 ( specific_006 ) end end false end
Uses same methods as the specific 008 methods
Uses same methods as the specific 008 methods
record