Class: Itools::Image

Inherits:
Object
  • Object
show all
Defined in:
lib/itools/find_unuse_img.rb

Overview


Class Method Summary collapse

Class Method Details

.get_image_name(file) ⇒ Object



119
120
121
# File 'lib/itools/find_unuse_img.rb', line 119

def self.get_image_name(file)
   return file.gsub(/@2x|@3x/,"")
end

.is_image_format(temp_ext_name) ⇒ Object

是否是图片格式,这里只判断了jpg、png和gif



112
113
114
115
116
117
118
# File 'lib/itools/find_unuse_img.rb', line 112

def self.is_image_format(temp_ext_name)
   if ['.jpg','.png','.gif'].include?(temp_ext_name)
      return true
   else
      return false
   end
end