module

Quartz

Constants

ALLOWED_SCALE_UNITS = ["yocto", "zepto", "atto", "femto", "pico", "nano", "micro", "milli", "base", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"]
FORMATTER = ::Log::Formatter.new do |entry, io| message = entry.message colorize = (@@colors && io.tty?) && Colorize.enabled? if colorize color = LOGGER_COLORS.fetch(entry.severity, :default) io << ((entry.timestamp.to_s("(%T:%L)")).colorize(color)) (io << (" ❯ ".colorize(:black))) << message else ((io << entry.severity.label[0]) << ": ") << (entry.timestamp.to_s("(%T:%L)")) (io << " ❯ ") << message end end
Log = ::Log.for(self)
MAJOR = 0_u8

The major version number

MINOR = 3_u8

The minor version number

PATCH = 2_u8

The patch version number

VERSION = [MAJOR, MINOR, PATCH].compact.join('.')

Class methods

colorize_logs=(value : Bool)
Source
set_debug_log_level
Source
set_io_log_backend
Source
set_no_log_backend
Source
set_warning_log_level
Source
timing(label, display_memory = true, padding_size = 34, &)
Source
version

Returns the current version

Source

Macros

duration(length, unit = "base")

The duration macro is syntax sugar to construct a new Duration struct.

Usage

duration must receive a number literal along with an optional scale unit. The scale unit can be specified with a constant expression (e.g. 'kilo'), or with a Scale struct.

duration(2)                # => Duration.new(2, Scale::BASE)
duration(2, Scale.new(76)) # => Duration.new(2, Scale.new(76))
duration(2, Scale::KILO)   # => Duration.new(2, Scale::KILO)
duration(2, kilo)          # => Duration.new(2, Scale::KILO)

If specified with a constant expression, the unit argument can be a string literal, a symbol literal or a plain name.

duration(2, kilo)
duration(2, 'kilo')
duration(2, :kilo)
Source

Nested types