lib/vedeu/colours/foreground.rb in vedeu-0.6.1 vs lib/vedeu/colours/foreground.rb in vedeu-0.6.2
- old
+ new
@@ -1,32 +1,36 @@
module Vedeu
- # The class represents one half (the other, can be found at
- # {Vedeu::Background}) of a terminal colour escape sequence.
- #
- class Foreground < Vedeu::ColourTranslator
+ module Colours
- private
+ # The class represents one half (the other, can be found at
+ # {Vedeu::Colours::Background}) of a terminal colour escape sequence.
+ #
+ class Foreground < Vedeu::Colours::Translator
- # @return [String]
- def named_codes
- Vedeu::Esc.foreground_codes[colour]
- end
+ private
- # @return [String]
- def numbered_prefix
- "\e[38;5;"
- end
+ # @return [String]
+ def named_codes
+ Vedeu::Esc.foreground_codes[colour]
+ end
- # @return [Vedeu::Foregrounds]
- def repository
- Vedeu.foreground_colours
- end
+ # @return [String]
+ def numbered_prefix
+ "\e[38;5;"
+ end
- # @return [String]
- def rgb_prefix
- "\e[38;2;%s;%s;%sm"
- end
+ # @return [Vedeu::Colours::Foregrounds]
+ def repository
+ Vedeu.foreground_colours
+ end
- end # Foreground
+ # @return [String]
+ def rgb_prefix
+ "\e[38;2;%s;%s;%sm"
+ end
+
+ end # Foreground
+
+ end # Colours
end # Vedeu