Module: Shrine::Plugins::DynamicStorage::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#find_storage(name) ⇒ Object


16
17
18
# File 'lib/shrine/plugins/dynamic_storage.rb', line 16

def find_storage(name)
  resolve_dynamic_storage(name) or super
end

#storage(regex, &block) ⇒ Object


12
13
14
# File 'lib/shrine/plugins/dynamic_storage.rb', line 12

def storage(regex, &block)
  opts[:dynamic_storage][:resolvers][regex] = block
end