Class: PaperclipCompression::Base
- Inherits:
-
Object
- Object
- PaperclipCompression::Base
- Defined in:
- lib/paperclip-compression/base.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file, options = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(file, options = {}) ⇒ Base
Returns a new instance of Base.
4 5 6 7 8 9 10 |
# File 'lib/paperclip-compression/base.rb', line 4 def initialize(file, = {}) @file = file @options = @whiny = .has_key?(:whiny) ? [:whiny] : true current_extension = File.extname(file.path) @basename = File.basename(file.path, current_extension) end |
Class Method Details
.make(file, options = {}) ⇒ Object
12 13 14 |
# File 'lib/paperclip-compression/base.rb', line 12 def self.make(file, = {}) new(file, ).make end |