module AttachmentSaver

Constants

VERSION

Public Class Methods

split_filename(filename) click to toggle source
# File lib/attachment_saver.rb, line 162
def self.split_filename(filename)
  pos = filename.rindex('.')
  if pos.nil?
    return [filename, nil]
  else
    return [filename[0..pos - 1], filename[pos + 1..-1]]
  end
end