class RemiLib::Format::Formatter

Overview

The Formatter class is used to format string data.

See the documentation on the RemiLib::Format module for the supported syntax.

Defined in:

remilib/format.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

toRsconf(io : IO, *, indentSize : Int = 2, alwaysQuoteKeys : Bool = false, explicitRootObject : Bool = false, commaAfterValues : Bool = false, extraNewlineBetweenToplevelKeys : Bool = false) : Nil
toRsconf(*, indentSize : Int = 2, alwaysQuoteKeys : Bool = false, explicitRootObject : Bool = false, commaAfterValues : Bool = false, extraNewlineBetweenToplevelKeys : Bool = false) : String
toRsconf

Class methods inherited from class Object

fromRsconf(toplevel : RemiLib::RSConf::RSValue)
fromRsconf(data : String | IO | Path)
fromRsconf

Constructor Detail

def self.new(controlString : String) #

Creates a new Formatter for the given control string.


[View source]

Instance Method Detail

def controlString : String #

The control string associated with this Formatter instance.


[View source]
def format(*args) : String #

Formats this Formatter's control string with the given arguments, then returns a new string.


[View source]