Class: Paperclip::Tinify

Inherits:
Processor
  • Object
show all
Defined in:
lib/paperclip-tinify.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.environmentsObject

Returns the value of attribute environments.



6
7
8
# File 'lib/paperclip-tinify.rb', line 6

def environments
  @environments
end

.tinify_keyObject

Returns the value of attribute tinify_key.



6
7
8
# File 'lib/paperclip-tinify.rb', line 6

def tinify_key
  @tinify_key
end

Instance Method Details

#makeObject



9
10
11
12
13
14
15
# File 'lib/paperclip-tinify.rb', line 9

def make
  case content_type
  when 'image/jpeg', 'image/png' then compress
  else
    @file
  end
end