Method: Extension.ext
- Defined in:
- lib/export_csv/file.rb
.ext(file) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/export_csv/file.rb', line 5 def ext file @ext = File.extname(file) if !@ext.nil? and !@ext.blank? and @ext.to_s == ".csv" return file else return file.split('.').first + '.' + 'csv' end end |