Class: PennMARC::InventoryEntry::Physical
- Defined in:
- lib/pennmarc/helpers/inventory_entry/physical.rb
Overview
Represent a Physical inventory entry
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call_num ⇒ String (frozen)
Call number from inventory entry.
-
#priority ⇒ String?
Priority for inventory entry.
-
#to_h ⇒ Hash{Symbol->Unknown
].
Methods inherited from Base
Constructor Details
This class inherits a constructor from PennMARC::InventoryEntry::Base
Instance Method Details
#call_num ⇒ String (frozen)
Call number from inventory entry
11 12 13 14 15 16 17 |
# File 'lib/pennmarc/helpers/inventory_entry/physical.rb', line 11 def call_num if source == :pub "#{field[mapper::HOLDING_CLASSIFICATION_PART]}#{field[mapper::HOLDING_ITEM_PART]}" elsif source == :api field[mapper::PHYS_CALL_NUMBER] end end |
#priority ⇒ String?
Note:
we currently don’t return priority in our publishing enrichment
Priority for inventory entry
22 23 24 25 26 |
# File 'lib/pennmarc/helpers/inventory_entry/physical.rb', line 22 def priority return nil if source == :pub field[mapper::PHYS_PRIORITY] end |
#to_h ⇒ Hash{Symbol->Unknown
29 30 31 32 33 34 35 |
# File 'lib/pennmarc/helpers/inventory_entry/physical.rb', line 29 def to_h { holding_id: field[mapper::PHYS_HOLDING_ID], location_name: field[mapper::PHYS_LOCATION_NAME], location_code: field[mapper::PHYS_LOCATION_CODE], call_num: call_num, priority: priority } end |