class Mindee::Parsing::Standard::FeatureField
Feature field object wrapper for specialized methods.
def format_for_display(in_str, max_col_size = nil)
-
(String)
-
Parameters:
-
max_col_size
(int, nil
) -- -
in_str
(String, Boolean, nil
) --
def format_for_display(in_str, max_col_size = nil) return 'True' if in_str == true return 'False' if in_str == false return '' if in_str.nil? return in_str if max_col_size.nil? in_str = in_str.gsub(%r{[\n\r\t]}, "\n" => '\\n', "\r" => '\\r', "\t" => '\\t') in_str.length <= max_col_size ? in_str : "#{in_str[0..max_col_size - 4]}..." end