module Shrine::Attacher::ClassMethods

Defined in:

shrine/attacher.cr

Instance Method Summary

Instance Method Detail

def from_data(data : Hash(String, String | UploadedFile::MetadataType)?, **options) #

Initializes the attacher from a data hash generated from Attacher#data.

attacher = Attacher.from_data({ "id" => "...", "storage" => "...", "metadata" => { ... } })
attacher.file #=> #<Shrine::UploadedFile>

[View source]