Method: Tailor::Formatters::Text#summary_first_col

Defined in:
lib/tailor/formatters/text.rb

#summary_first_col(path, string_size = MAX_STRING_SIZE) ⇒ Object



149
150
151
152
153
154
155
156
# File 'lib/tailor/formatters/text.rb', line 149

def summary_first_col(path, string_size=MAX_STRING_SIZE)
  fp = path.to_s.ljust(string_size)
  offset = fp.size - string_size
  end_of_string = fp[offset..-1]
  end_of_string.sub!(/^.{3}/, '...') unless offset.zero?

  end_of_string
end