module Shrine::Attacher::ClassMethods
Defined in:
shrine/attacher.crInstance Method Summary
-
#from_data(data : Hash(String, String | UploadedFile::MetadataType)?, **options)
Initializes the attacher from a data hash generated from
Attacher#data
.
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>