Method: TFClient::ResponseParser.tokenize_line

Defined in:
lib/textflight-client/response_parser.rb

.tokenize_line(line:) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/textflight-client/response_parser.rb', line 36

def self.tokenize_line(line:)
  lines = line.split(FIELD_DELIMITER)
  stripped = []
  lines.each_with_index do |line, index|
    if index == 0
      stripped << line
    else
      stripped << line.strip
    end
  end
  stripped
end