Module: ComputerType
- Includes:
- RecordType
- Defined in:
- lib/enhanced_marc/computer_type.rb
Overview
Methods for Computer records
Instance Method Summary collapse
Instance Method Details
#file_type(human_readable = false) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/enhanced_marc/computer_type.rb', line 5 def file_type(human_readable = false) return false unless 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 field_parser({ match: 'COM', start: 26, end: 1 }, { match: 'm', start: 9, end: 1 }, human_readable) end |