Class: BerkeleyLibrary::Location::LocationResult
- Inherits:
-
Object
- Object
- BerkeleyLibrary::Location::LocationResult
- Defined in:
- lib/berkeley_library/location/location_result.rb
Instance Attribute Summary collapse
-
#ht_error ⇒ Object
readonly
Returns the value of attribute ht_error.
-
#ht_record_url ⇒ Object
readonly
Returns the value of attribute ht_record_url.
-
#oclc_number ⇒ Object
readonly
Returns the value of attribute oclc_number.
-
#wc_error ⇒ Object
readonly
Returns the value of attribute wc_error.
-
#wc_symbols ⇒ Object
readonly
Returns the value of attribute wc_symbols.
Instance Method Summary collapse
-
#initialize(oclc_number, wc_symbols: [], wc_error: nil, ht_record_url: nil, ht_error: nil) ⇒ LocationResult
constructor
A new instance of LocationResult.
- #slfn? ⇒ Boolean
- #slfs? ⇒ Boolean
- #uc_symbols ⇒ Object
Constructor Details
#initialize(oclc_number, wc_symbols: [], wc_error: nil, ht_record_url: nil, ht_error: nil) ⇒ LocationResult
Returns a new instance of LocationResult.
8 9 10 11 12 13 14 |
# File 'lib/berkeley_library/location/location_result.rb', line 8 def initialize(oclc_number, wc_symbols: [], wc_error: nil, ht_record_url: nil, ht_error: nil) @oclc_number = oclc_number @wc_symbols = wc_symbols @wc_error = wc_error @ht_record_url = ht_record_url @ht_error = ht_error end |
Instance Attribute Details
#ht_error ⇒ Object (readonly)
Returns the value of attribute ht_error.
6 7 8 |
# File 'lib/berkeley_library/location/location_result.rb', line 6 def ht_error @ht_error end |
#ht_record_url ⇒ Object (readonly)
Returns the value of attribute ht_record_url.
6 7 8 |
# File 'lib/berkeley_library/location/location_result.rb', line 6 def ht_record_url @ht_record_url end |
#oclc_number ⇒ Object (readonly)
Returns the value of attribute oclc_number.
6 7 8 |
# File 'lib/berkeley_library/location/location_result.rb', line 6 def oclc_number @oclc_number end |
#wc_error ⇒ Object (readonly)
Returns the value of attribute wc_error.
6 7 8 |
# File 'lib/berkeley_library/location/location_result.rb', line 6 def wc_error @wc_error end |
#wc_symbols ⇒ Object (readonly)
Returns the value of attribute wc_symbols.
6 7 8 |
# File 'lib/berkeley_library/location/location_result.rb', line 6 def wc_symbols @wc_symbols end |
Instance Method Details
#slfn? ⇒ Boolean
16 17 18 |
# File 'lib/berkeley_library/location/location_result.rb', line 16 def slfn? @has_slfn ||= wc_symbols.intersection(WorldCat::Symbols::SLFN).any? end |
#slfs? ⇒ Boolean
20 21 22 |
# File 'lib/berkeley_library/location/location_result.rb', line 20 def slfs? @has_slfs ||= wc_symbols.intersection(WorldCat::Symbols::SLFS).any? end |
#uc_symbols ⇒ Object
24 25 26 |
# File 'lib/berkeley_library/location/location_result.rb', line 24 def uc_symbols @uc_symbols ||= wc_symbols.intersection(WorldCat::Symbols::UC) end |