Releases: jetrockets/shrine.cr
Releases · jetrockets/shrine.cr
Shrine::UploadedFile#download
Added Shrine::UploadedFile#download.
Plugin System
Improvements
- Added ability to extend Shrine with plugins
module FooPlugin
# This will extend your uploader class methods
module ClassMethods; def foo; "plugin_foo"; end; end
# This will included into your uploader instance methods
module InstanceMethods; def foo; "plugin_foo"; end; end
# This will extend <YourUploader>::UploadedFile class methods
module FileClassMethods; def foo; "plugin_foo"; end; end
# This will included into <YourUploader>::UploadedFile instance methods
module FileMethods; def foo; "plugin_foo"; end; end
end
class Shrine
load_plugin ::FooPlugin
create_plugins_class_method
end