AwesomePrint::Formatters::BaseFormatter
Inherits Reference < Object
Constants
DEFAULT_LIMIT_SIZE = 7
INDENT_CACHE = (0..100).map do |i| " " * i end
Constructors
new(inspector : Inspector)
SourceInstance methods
align(value : String, width : Int32) : String
Sourcecolored_label_wrapper(label : String, opening : String = "[", closing : String = "]") : Tuple(String, String)
Sourcecolorize(value : String, type : Symbol) : String
Sourcecolorless(value : String) : String
Sourcecolorless_size(value : String) : Int32
Sourceget_limit_size
Sourceindent(n : Int32 = indentation) : String
Sourceindentation
Sourceindented
Sourceindex_width(size : Int32) : Int32
Sourceindexed_collection_lines(items) : Array(String)
Sourceindexed_collection_prefix(index : Int32, width : Int32) : String
Sourceinline_collection_values(items) : Array(String)
Sourceinspector
Sourcelimited(data : Array(String), width : Int32, is_hash : Bool = false) : Array(String)
Sourcelimited_inline_values(data : Array(String)) : Array(String)
Sourcemultiline_braced_mapping(data : Array(String), width : Int32) : String
Sourcemultiline_indexed_collection(items, opening_token : String, closing_token : String) : String
Sourceoutdent
Sourceshould_be_limited?
Sourcesingleline_braced_collection(data : Array(String)) : String
Sourcewrite_inline_collection(io : IO, items, opening_token : String, closing_token : String, spacing : Bool = true) : Nil
Sourcewrite_multiline_indexed_collection(io : IO, items, opening_token : String, closing_token : String) : Nil
Source