Module Pry::Helpers::Text
In: lib/pry/helpers/text.rb

The methods defined on {Text} are available to custom commands via {Pry::Command#text}.

Methods

Constants

COLORS = { "black" => 0, "red" => 1, "green" => 2, "yellow" => 3, "blue" => 4, "purple" => 5, "magenta" => 5, "cyan" => 6, "white" => 7

External Aliases

bold -> bright_default

Public Class methods

Returns text as bold text for use on a terminal. _Pry.color_ must be true for this method to perform any transformations.

@param [String, to_s] text @return [String] text

Returns `text` in the default foreground colour. Use this instead of "black" or "white" when you mean absence of colour.

@param [String, to_s] text @return [String]

Returns text indented by chars spaces.

@param [String] text @param [Fixnum] chars

Executes the block with `Pry.color` set to false. @yield @return [void]

Executes the block with `Pry.config.pager` set to false. @yield @return [void]

Remove any color codes from text.

@param [String, to_s] text @return [String] text stripped of any color codes.

Returns text in a numbered list, beginning at offset.

@param [each_line] text @param [Fixnum] offset @return [String]

[Validate]