Method: Middleman::Images::Image#initialize

Defined in:
lib/middleman-images/image.rb

#initialize(store, path, source, options = {}) ⇒ Image

Returns a new instance of Image.



11
12
13
14
15
16
17
18
19
20
# File 'lib/middleman-images/image.rb', line 11

def initialize(store, path, source, options = {})
  @original_source_file = source

  processed_source_file = File.join(store.app.root, options.delete(:cache_dir), path)
  FileUtils.mkdir_p File.dirname(processed_source_file)

  @processing_options = options

  super(store, path, processed_source_file)
end