module

Asciidoctor::Helpers

Constants

ROMAN_NUMERALS = {'I' => 1, 'V' => 5, 'X' => 10, 'L' => 50, 'C' => 100, 'D' => 500, 'M' => 1000}
ROMAN_NUMERALS_WITH_REDUCERS = [{"M", 1000}, {"CM", 900}, {"D", 500}, {"CD", 400}, {"C", 100}, {"XC", 90}, {"L", 50}, {"XL", 40}, {"X", 10}, {"IX", 9}, {"V", 5}, {"IV", 4}, {"I", 1}]

Instance methods

basename(filename : String, drop_ext : String | Bool | Nil = nil) : String

Public: Retrieves the basename of the filename, optionally removing the extension.

Source
encode_spaces_in_uri(str : String) : String

Internal: Apply URI path encoding to spaces in the specified string.

Source
encode_uri_component(str : String) : String

Internal: Encode a URI component String for safe inclusion in a URI.

Source
extname(path : String, fallback : String = "") : String

Public: Retrieves the file extension of the specified path.

Source
extname?(path : String) : Bool

Public: Returns whether this path has a file extension.

Source
int_to_roman(val : Int32) : String

Internal: Converts an integer to a Roman numeral.

Source
mkdir_p(dir : String) : Nil

Internal: Make a directory, ensuring all parent directories exist.

Source
nextval(current : Int32) : Int32

Internal: Get the next value in the sequence.

Source
nextval(current : String) : String | Int32

Internal: Get the next value in the sequence.

Source
prepare_source_array(data : Array(String), trim_end : Bool = true) : Array(String)

Internal: Prepare the source data Array for parsing.

Source
prepare_source_string(data : String, trim_end : Bool = true) : Array(String)

Internal: Prepare the source data String for parsing.

Source
resolve(target : String, start : String | Nil = nil) : String

Internal: Resolve a system path from the target and start values.

Source
roman_to_int(val : String) : Int32

Internal: Converts an uppercase Roman numeral to an integer.

Source
rootname(filename : String) : String

Public: Removes the file extension from filename and returns the result.

Source
uriish?(str : String) : Bool

Internal: Efficiently checks whether the specified String resembles a URI.

Source