Class: BerkeleyLibrary::Location::XLSXWriter
- Inherits:
-
Object
- Object
- BerkeleyLibrary::Location::XLSXWriter
- Includes:
- Constants, BerkeleyLibrary::Logging
- Defined in:
- lib/berkeley_library/location/xlsx_writer.rb
Constant Summary collapse
- COL_NRLF =
'NRLF'.freeze
- COL_SRLF =
'SRLF'.freeze
- COL_OTHER_UC =
'Other UC'.freeze
- COL_WC_ERROR =
'WorldCat Error'.freeze
- COL_HATHI_TRUST =
'Hathi Trust'.freeze
- COL_HATHI_TRUST_ERROR =
"#{COL_HATHI_TRUST} Error".freeze
- V_NRLF =
'nrlf'.freeze
- V_SRLF =
'srlf'.freeze
Constants included from Constants
Instance Attribute Summary collapse
-
#hathi_trust ⇒ Object
readonly
Returns the value of attribute hathi_trust.
-
#rlf ⇒ Object
readonly
Returns the value of attribute rlf.
-
#ss ⇒ Object
readonly
Returns the value of attribute ss.
-
#uc ⇒ Object
readonly
Returns the value of attribute uc.
Instance Method Summary collapse
- #<<(result) ⇒ Object
-
#initialize(ss, rlf: true, uc: true, hathi_trust: true) ⇒ XLSXWriter
constructor
A new instance of XLSXWriter.
Constructor Details
#initialize(ss, rlf: true, uc: true, hathi_trust: true) ⇒ XLSXWriter
Returns a new instance of XLSXWriter.
23 24 25 26 27 28 29 30 |
# File 'lib/berkeley_library/location/xlsx_writer.rb', line 23 def initialize(ss, rlf: true, uc: true, hathi_trust: true) @ss = ss @rlf = rlf @uc = uc @hathi_trust = hathi_trust ensure_columns! end |
Instance Attribute Details
#hathi_trust ⇒ Object (readonly)
Returns the value of attribute hathi_trust.
21 22 23 |
# File 'lib/berkeley_library/location/xlsx_writer.rb', line 21 def hathi_trust @hathi_trust end |
#rlf ⇒ Object (readonly)
Returns the value of attribute rlf.
21 22 23 |
# File 'lib/berkeley_library/location/xlsx_writer.rb', line 21 def rlf @rlf end |
#ss ⇒ Object (readonly)
Returns the value of attribute ss.
21 22 23 |
# File 'lib/berkeley_library/location/xlsx_writer.rb', line 21 def ss @ss end |
#uc ⇒ Object (readonly)
Returns the value of attribute uc.
21 22 23 |
# File 'lib/berkeley_library/location/xlsx_writer.rb', line 21 def uc @uc end |
Instance Method Details
#<<(result) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/berkeley_library/location/xlsx_writer.rb', line 32 def <<(result) r_indices = row_indices_for(result.oclc_number) r_indices.each do |idx| write_wc_cols(idx, result) if rlf || uc write_ht_cols(idx, result) if hathi_trust end end |