class Shrine::Storage::Memory

Defined in:

shrine/storage/memory.cr

Constructors

Instance Method Summary

Instance methods inherited from class Shrine::Storage::Base

clean(path : String) clean, clean? : Bool clean?, delete(id : String) delete, exists?(id : String) : Bool exists?, open(id : String, **options) : IO open, upload(io : IO | UploadedFile, id : String, move = false, **options) upload, url(id : String, **options) : String url

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def clear! #

[View source]
def delete(id : String) #
Description copied from class Shrine::Storage::Base

deletes the file from the storage


[View source]
def delete_prefixed(delete_prefix : String) #

[View source]
def exists?(id : String) : Bool #
Description copied from class Shrine::Storage::Base

returns whether the file exists on storage


[View source]
def open(id : String) : IO #

[View source]
def open(id : String, **options) : IO #
Description copied from class Shrine::Storage::Base

returns the remote file as an IO-like object


[View source]
def path(id : String) : String #

[View source]
def store : Hash(String, String) #

[View source]
def upload(io : IO | UploadedFile, id : String, move = false, **options) #
Description copied from class Shrine::Storage::Base

uploads io to the location id, can accept upload options


[View source]
def url(id : String, **options) : String #
Description copied from class Shrine::Storage::Base

returns URL to the remote file, can accept URL options


[View source]