class Shrine::Storage::Memory
- Shrine::Storage::Memory
- Shrine::Storage::Base
- Reference
- Object
Defined in:
shrine/storage/memory.crConstructors
Instance Method Summary
- #clear!
-
#delete(id : String)
deletes the file from the storage
- #delete_prefixed(delete_prefix : String)
-
#exists?(id : String) : Bool
returns whether the file exists on storage
- #open(id : String) : IO
-
#open(id : String, **options) : IO
returns the remote file as an IO-like object
- #path(id : String) : String
- #store : Hash(String, String)
-
#upload(io : IO | UploadedFile, id : String, move = false, **options)
uploads
io
to the locationid
, can accept upload options -
#url(id : String, **options) : String
returns URL to the remote file, can accept URL options
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
Instance Method Detail
def delete(id : String)
#
Description copied from class Shrine::Storage::Base
deletes the file from the storage
def exists?(id : String) : Bool
#
Description copied from class Shrine::Storage::Base
returns whether the file exists on storage
def open(id : String, **options) : IO
#
Description copied from class Shrine::Storage::Base
returns the remote file as an IO-like object
Description copied from class Shrine::Storage::Base
uploads io
to the location id
, can accept upload options
def url(id : String, **options) : String
#
Description copied from class Shrine::Storage::Base
returns URL to the remote file, can accept URL options