Class: PennMARC::InventoryEntry::Electronic

Inherits:
Base
  • Object
show all
Defined in:
lib/pennmarc/helpers/inventory_entry/electronic.rb

Overview

Represent a Electronic inventory entry - simple because the subfield specification is identical across entries returned by the API and Alma Publishing enrichment

Instance Attribute Summary

Attributes inherited from Base

#field, #mapper, #source

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PennMARC::InventoryEntry::Base

Instance Method Details

#to_hHash{Symbol->Unknown

Returns ].

Returns:

  • (Hash{Symbol->Unknown)

    ]



11
12
13
14
15
16
17
# File 'lib/pennmarc/helpers/inventory_entry/electronic.rb', line 11

def to_h
  { portfolio_id: field[mapper::ELEC_PORTFOLIO_ID],
    url: field[mapper::ELEC_SERVICE_URL],
    collection_name: field[mapper::ELEC_COLLECTION_NAME],
    coverage: field[mapper::ELEC_COVERAGE_STMT],
    note: field[mapper::ELEC_PUBLIC_NOTE] }
end