class

Bakelite::BakedItem

Inherits Bakelite::Item < Reference < Object

Directly inlined static asset (Bake mode). Holds a direct reference to static binary data in memory for instant, zero-copy reads.

Constructors

from_string(path : String, volume_name : Symbol | String, str : String, mime_type : String | Nil = nil, crc32 : UInt32 | Nil = nil) : BakedItem

Fast constructor from string literal

Source
new(path : String, volume_name : Symbol | String, data : Bytes, mime_type : String | Nil = nil, crc32 : UInt32 | Nil = nil)
Source

Instance methods

data
Source
open

Opens a readable stream for this asset.

Source
to_s(io : IO) : Nil

Streams the content into the given output IO.

Source
to_s

Returns the content as a UTF-8 String.

Source
to_slice

Returns the full contents as a byte slice.

Source