Class: RawLine::Prompt
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- RawLine::Prompt
- Defined in:
- lib/rawline/prompt.rb
Instance Method Summary collapse
-
#length ⇒ Object
Length returns the length of the prompt minus any ANSI escape sequences.
Instance Method Details
#length ⇒ Object
Length returns the length of the prompt minus any ANSI escape sequences.
7 8 9 |
# File 'lib/rawline/prompt.rb', line 7 def length self.gsub(/\033\[[0-9;]*m/, "").length end |