Latch
Inherits Habitat::SettingsHelpers / Habitat::TempConfig
Constants
VERSION = {{ (`shards version \"/tmp/tmp.BbOcNK/src/src/latch\"`).chomp.stringify }}
Class methods
configure
SourceRetrieves a storage by name, raising if not found.
Latch.find_storage("store") # => Storage::FileSystem
Latch.find_storage("missing") # raises Latch::Error
settings
Sourcewith_file(io : IO, &)
Utility to work with a file IO. If the IO is already a File, yields it directly, Otherwise copies to a tempfile, yields it, then cleans up.
Latch.with_file(io) do |file|
# file is guaranteed to be a File with a path
end
with_file(uploaded_file : StoredFile, &)
SourceInstance methods
settings
SourceNested types
- Latch::Avram
- Latch::CliToolNotFound
- Latch::Error
- Latch::Extractor
- Latch::FileNotFound
- Latch::HabitatSettings
- Latch::InvalidFile
- Latch::MetadataHash
- Latch::MetadataMethods
- Latch::MetadataValue
- Latch::ProcessingError
- Latch::Processor
- Latch::RunCommand
- Latch::Storage
- Latch::StoredFile
- Latch::StringOrInt
- Latch::UploadedFile
- Latch::Uploader
- Latch::VariantOptions