Module: SampleManifestExcel::Upload::Converters

Included in:
Data, Row
Defined in:
app/sample_manifest_excel/sample_manifest_excel/upload/converters.rb

Overview

rubocop:todo Style/Documentation

Constant Summary collapse

BLANK_CHARS =
'[ \u00A0]'
BLANK_CHARS_REGEXP =
/^(#{Converters::BLANK_CHARS}*)(.*?)(#{Converters::BLANK_CHARS}*)$/.freeze

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