diff --git a/lib/thumbnail/formats.rb b/lib/thumbnail/formats.rb index fcbe160674a86a676dcef60d9894ecb7804de9c8..93840d16bba214456ee15aa25a6bfab4ec680a65 100644 --- a/lib/thumbnail/formats.rb +++ b/lib/thumbnail/formats.rb @@ -1,15 +1,24 @@ module Thumbnail module Formats - def get_file_format file + def get_file_basename file unless file.nil? - file_format = File.extname(file) + file_format = File.basename(file) else file_format = "" end file_format end + def get_file_extname file + unless file.nil? + file_name = File.extname(file) + else + file_name = "" + end + file_name + end + def array_to_upcase array upcase_array = [] array.each do |a|