lib/vedeu/colours/foreground.rb in vedeu-0.7.4 vs lib/vedeu/colours/foreground.rb in vedeu-0.8.0

- old
+ new

@@ -8,19 +8,30 @@ # # @api private # class Foreground < Vedeu::Colours::Translator + # @return [Boolean] + def foreground? + present?(to_s) + end + private # @return [String] def prefix "\e[38;".freeze end + # Returns an escape sequence for a named colour. + # + # @note + # Valid names can be found at + # {Vedeu::EscapeSequences::Esc#valid_codes} + # # @return [String] - def named_codes - Vedeu::EscapeSequences::Esc.foreground_codes[colour] + def named_code + Vedeu::EscapeSequences::Esc.foreground_colour(colour) end # @return [Vedeu::Colours::Foregrounds] def repository Vedeu.foreground_colours