Class: BerkeleyLibrary::Alma::BarCode
- Inherits:
-
Object
- Object
- BerkeleyLibrary::Alma::BarCode
- Includes:
- RecordId
- Defined in:
- lib/berkeley_library/alma/barcode.rb
Overview
RecordId subclass representing an item barcode.
Constant Summary
Constants included from Constants
Constants::ALMA_RECORD_RE, Constants::DEFAULT_USER_AGENT, Constants::MILLENNIUM_RECORD_RE
Instance Attribute Summary collapse
-
#barcode ⇒ Object
readonly
Returns the value of attribute barcode.
Instance Method Summary collapse
-
#initialize(barcode) ⇒ BarCode
constructor
Initialize a barcode.
-
#sru_query_value ⇒ String
Returns the SRU query value for this Barcode.
Methods included from RecordId
#<=>, #get_marc_record, #get_marc_xml, #marc_uri, parse
Constructor Details
#initialize(barcode) ⇒ BarCode
Initialize a barcode. Since we purchase barcodes of varied formats and accept vendor barcodes as well we are only validating whether it's a string or not.
13 14 15 16 |
# File 'lib/berkeley_library/alma/barcode.rb', line 13 def initialize() string?() @barcode = end |
Instance Attribute Details
#barcode ⇒ Object (readonly)
Returns the value of attribute barcode.
9 10 11 |
# File 'lib/berkeley_library/alma/barcode.rb', line 9 def @barcode end |
Instance Method Details
#sru_query_value ⇒ String
Returns the SRU query value for this Barcode.
21 22 23 |
# File 'lib/berkeley_library/alma/barcode.rb', line 21 def sru_query_value "alma.barcode=#{@barcode}" end |