method

chomp

ruby latest stable - Class: Kernel
chomp(*args)
public

Equivalent to $_ = $_.chomp(string). See String#chomp. Available only when -p/-n command line option specified.