struct StaticAssets::ResolvedAsset

Overview

Resolved asset representation selected for a given request and Accept-Encoding.

Defined in:

static_assets/store.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(content_type : String, size : Int64, last_modified : Time, etag : String, encoding : Encoding, has_compressed_variants : Bool, file_path : String | Nil = nil, bytes : Bytes | Nil = nil) #

[View source]

Instance Method Detail

def bytes : Bytes | Nil #

[View source]
def content_type : String #

[View source]
def encoding : Encoding #

[View source]
def etag : String #

[View source]
def file_path : String | Nil #

[View source]
def has_compressed_variants? : Bool #

[View source]
def last_modified : Time #

[View source]
def size : Int64 #

[View source]
def write_to(io : IO, offset : Int64 = 0_i64, length : Int64 | Nil = nil) : Nil #

Streams the full representation or a byte sub-range directly to io.


[View source]