Class: Solrizer::DefaultDescriptors::MarcCodeTextableDescriptor
- Inherits:
-
Solrizer::Descriptor
- Object
- Solrizer::Descriptor
- Solrizer::DefaultDescriptors::MarcCodeTextableDescriptor
- Includes:
- Normal
- Defined in:
- lib/cul_hydra/solrizer_patch.rb
Overview
Constant Summary
Constants included from Normal
Normal::FULL_PROJ, Normal::FULL_REPO, Normal::LONG_REPO, Normal::SHORT_PROJ, Normal::SHORT_REPO
Instance Method Summary collapse
Methods included from Normal
#normal, #normal!, #translate_with_default
Instance Method Details
#converter(field_type) ⇒ Object
158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/cul_hydra/solrizer_patch.rb', line 158 def converter(field_type) lambda do |value| if value.is_a? String normal!(value) r = [translate_with_default(SHORT_REPO, value, 'Non-Columbia Location')] r << translate_with_default(LONG_REPO, value, 'Non-Columbia Location') r.uniq! r.join(' ') else value end end end |
#name_and_converter(field_name, args = nil) ⇒ Object
155 156 157 |
# File 'lib/cul_hydra/solrizer_patch.rb', line 155 def name_and_converter(field_name, args=nil) super('all_text', args) end |