module CSV::DeleteSuffix

Public Instance Methods

delete_suffix(suffix) Show source
# File lib/csv/delete_suffix.rb, line 8
def delete_suffix(suffix)
  if end_with?(suffix)
    self[0...-suffix.size]
  else
    self
  end
end

Ruby Core © 1993–2020 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.