Module: SampleManifestExcel::Upload::Converters
- Defined in:
- app/sample_manifest_excel/sample_manifest_excel/upload/converters.rb
Constant Summary collapse
- BLANK_CHARS =
'[ \u00A0]'
- BLANK_CHARS_REGEXP =
/^(#{Converters::BLANK_CHARS}*)(.*?)(#{Converters::BLANK_CHARS}*)$/
Instance Method Summary collapse
Instance Method Details
#strip_all_blanks(obj) ⇒ Object
9 10 11 |
# File 'app/sample_manifest_excel/sample_manifest_excel/upload/converters.rb', line 9 def strip_all_blanks(obj) obj.respond_to?(:match) ? obj.match(BLANK_CHARS_REGEXP)[2] : obj end |