class

AwesomePrint::Formatters::BaseFormatter

Inherits Reference < Object

Constants

DEFAULT_LIMIT_SIZE = 7
INDENT_CACHE = (0..100).map do |i| " " * i end

Constructors

new(inspector : Inspector)
Source

Instance methods

align(value : String, width : Int32) : String
Source
colored_label_wrapper(label : String, opening : String = "[", closing : String = "]") : Tuple(String, String)
Source
colorize(value : String, type : Symbol) : String
Source
colorless(value : String) : String
Source
colorless_size(value : String) : Int32
Source
get_limit_size
Source
indent(n : Int32 = indentation) : String
Source
indentation
Source
indented
Source
index_width(size : Int32) : Int32
Source
indexed_collection_lines(items) : Array(String)
Source
indexed_collection_prefix(index : Int32, width : Int32) : String
Source
inline_collection_values(items) : Array(String)
Source
inspector
Source
limited(data : Array(String), width : Int32, is_hash : Bool = false) : Array(String)
Source
limited_inline_values(data : Array(String)) : Array(String)
Source
multiline_braced_mapping(data : Array(String), width : Int32) : String
Source
multiline_indexed_collection(items, opening_token : String, closing_token : String) : String
Source
outdent
Source
should_be_limited?
Source
singleline_braced_collection(data : Array(String)) : String
Source
write_inline_collection(io : IO, items, opening_token : String, closing_token : String, spacing : Bool = true) : Nil
Source
write_multiline_indexed_collection(io : IO, items, opening_token : String, closing_token : String) : Nil
Source