module

Lucky::FormatRegistry

Registry for custom formats that extends the built-in Format enum

Class methods

custom_formats

Storage for custom format mappings

Source
from_extension(extension : String) : Lucky::Format | CustomFormat | Nil

Find format by extension (checks both built-in and custom formats)

Source
from_mime_type(mime_type : String) : Lucky::Format | CustomFormat | Nil

Find format by MIME type (checks both built-in and custom formats)

Source
known_extensions

Get all known extensions (built-in + custom)

Source
known_mime_types

Get all known MIME types (built-in + custom)

Source
register(name : String, extension : String, mime_type : String) : Nil

Register a custom format

Source

Nested types