class Shrine::Attacher
- Shrine::Attacher
- Reference
- Object
Overview
Core class that handles attaching files. It uses Shrine and Shrine::UploadedFile objects internally.
Included Modules
Extended Modules
Defined in:
shrine/attacher.crClass Method Summary
-
.shrine_class : Shrine.class
Returns the Shrine class that this attacher class is namespaced under.
Instance methods inherited from module Shrine::Attacher::InstanceMethods
assign(value : IO?, **options)
assign,
attach(io : IO | Shrine::UploadedFile | Nil, storage = store_key, **options) : UploadedFile?
attach,
attach_cached(value : IO | UploadedFile | Nil, **options)attach_cached(value : String | Hash(String, String | UploadedFile::MetadataType), **options) attach_cached, attached? attached?, cache_key cache_key, cached?(file = self.file) cached?, change(file : Shrine::UploadedFile?) : Shrine::UploadedFile? change, changed? changed?, context context, data data, destroy destroy, destroy_attached destroy_attached, destroy_previous destroy_previous, file : Shrine::UploadedFile? file, file! file!, file=(file : Shrine::UploadedFile?) file=, finalize finalize, get get, load_data(data : Hash(String, String | UploadedFile::MetadataType))
load_data(data : Nil)
load_data(**data) load_data, promote(storage = store_key, **options) : Shrine::UploadedFile? promote, promote_cached(**options) promote_cached, set(file : Shrine::UploadedFile?) : Shrine::UploadedFile? set, shrine_class shrine_class, store_key store_key, stored?(file = self.file) stored?, upload(io : IO | Shrine::UploadedFile, storage = store_key, **options) : Shrine::UploadedFile upload, uploaded_file(value) uploaded_file, url(**options) url
Constructor methods inherited from module Shrine::Attacher::InstanceMethods
new(file : Shrine::UploadedFile? = nil, cache_key : String = "cache", store_key : String = "store")
new
Class Method Detail
Returns the Shrine class that this attacher class is namespaced under.