Module: ComputerType

Includes:
RecordType
Defined in:
lib/enhanced_marc/computer_type.rb

Instance Method Summary collapse

Instance Method Details

#file_type(human_readable = false) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/enhanced_marc/computer_type.rb', line 4

def file_type(human_readable=false)
  return false unless self.contains_type?("COM")
  file_map = {'a'=>'Numeric data', 'b'=>'Computer program', 'c'=>'Representational',
    'd'=>'Document', 'e'=>'Bibliographic data', 'f'=>'Font', 'g'=>'Game',
    'h'=>'Sounds', 'i'=>'Interactive multimedia', 'j'=>'Online', 'm'=>'Combination',
    'u'=>'Unknown', 'z'=>'Other'}
  human_readable = file_map if human_readable
  return self.field_parser({:match=>'COM', :start=>26,:end=>1}, {:match=>'m', :start=>9,:end=>1}, human_readable)        
end