Module: Shrine::Plugins::Mirroring

Defined in:
lib/shrine/plugins/mirroring.rb

Overview

Documentation can be found on shrinerb.com/docs/plugins/mirroring

Defined Under Namespace

Modules: ClassMethods, FileMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.configure(uploader, **opts) ⇒ Object


7
8
9
10
11
12
# File 'lib/shrine/plugins/mirroring.rb', line 7

def self.configure(uploader, **opts)
  uploader.opts[:mirroring] ||= { upload: true, delete: true }
  uploader.opts[:mirroring].merge!(opts)

  fail Error, ":mirror option is required for mirroring plugin" unless uploader.opts[:mirroring][:mirror]
end