lib/vedeu/output/foreground.rb in vedeu-0.4.19 vs lib/vedeu/output/foreground.rb in vedeu-0.4.20

- old
+ new

@@ -4,43 +4,22 @@ # {Vedeu::Background}) of a terminal colour escape sequence. class Foreground < Vedeu::Translator private - # Registers a HTML/CSS colour code and escape sequence to reduce processing. - # - # @param colour [String] A HTML/CSS colour code. - # @param escape_sequence [String] The HTML/CSS colour code as an escape - # sequence. # @return [String] - def register(colour, escape_sequence) - Vedeu.foreground_colours.register(colour, escape_sequence) - end - - # Returns a boolean indicating the HTML/CSS colour code has been registered. - # - # @param colour [String] - # @return [Boolean] - def registered?(colour) - Vedeu.foreground_colours.registered?(colour) - end - - # Retrieves the escape sequence for the HTML/CSS colour code. - # - # @param colour [String] - # @return [String] - def retrieve(colour) - Vedeu.foreground_colours.retrieve(colour) - end - - # @return [String] def named_codes Vedeu::Esc.foreground_codes[colour] end # @return [String] def numbered_prefix "\e[38;5;" + end + + # @return [Vedeu::ForegroundColours] + def repository + Vedeu.foreground_colours end # @return [String] def rgb_prefix "\e[38;2;%s;%s;%sm"