class ContentDisposition

Defined in:

content_disposition.cr

Constant Summary

ATTACHMENT = "attachment"
DEFAULT_TO_ASCII = ->(filename : String) do array = [] of Char filename.each_char do |char| array << (char.ascii? ? char : '?') end array.join end
INLINE = "inline"
RFC_5987_ESCAPED_CHAR = /[^A-Za-z0-9!#$&+.^_`|~-]/
TRADITIONAL_ESCAPED_CHAR = /[^ A-Za-z0-9!#$+.^_`|~-]/

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(disposition : String | Symbol, filename : String | Nil, to_ascii : Proc(String, String) | Nil = nil) #

[View source]

Class Method Detail

def self.attachment(filename = nil) #

[View source]
def self.call(**options) #

[View source]
def self.format(**options) #

[View source]
def self.inline(filename = nil) #

[View source]
def self.to_ascii : Proc(String, String) | Nil #

[View source]
def self.to_ascii=(to_ascii : Proc(String, String) | Nil) #

[View source]

Instance Method Detail

def ascii_filename : String | Nil #

[View source]
def disposition : String | Symbol #

[View source]
def filename : String? #

[View source]
def to_ascii : String -> String #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def utf8_filename : String | Nil #

[View source]