Class: Exlibris::Aleph::Holding::Metadata
- Defined in:
- lib/exlibris/aleph/holding/metadata.rb
Instance Attribute Summary collapse
-
#marc_xml ⇒ Object
readonly
Returns the value of attribute marc_xml.
Instance Method Summary collapse
-
#initialize(marc_xml) ⇒ Metadata
constructor
A new instance of Metadata.
- #location ⇒ Object
- #shelving_location ⇒ Object
- #sub_location ⇒ Object
Methods inherited from Metadata
Constructor Details
#initialize(marc_xml) ⇒ Metadata
Returns a new instance of Metadata.
8 9 10 11 12 |
# File 'lib/exlibris/aleph/holding/metadata.rb', line 8 def initialize(marc_xml) marc_xml.gsub!('<holding>', '<record>') marc_xml.gsub!('</holding>', '</record>') @marc_xml = marc_xml.strip end |
Instance Attribute Details
#marc_xml ⇒ Object (readonly)
Returns the value of attribute marc_xml.
6 7 8 |
# File 'lib/exlibris/aleph/holding/metadata.rb', line 6 def marc_xml @marc_xml end |
Instance Method Details
#location ⇒ Object
22 23 24 |
# File 'lib/exlibris/aleph/holding/metadata.rb', line 22 def location @location ||= marc_record['852'] unless marc_record.nil? end |
#shelving_location ⇒ Object
18 19 20 |
# File 'lib/exlibris/aleph/holding/metadata.rb', line 18 def shelving_location @shelving_location ||= location['c'] unless location.nil? end |
#sub_location ⇒ Object
14 15 16 |
# File 'lib/exlibris/aleph/holding/metadata.rb', line 14 def sub_location @sub_location ||= location['b'] unless location.nil? end |