lib/vedeu/presentation/translator.rb in vedeu-0.3.4 vs lib/vedeu/presentation/translator.rb in vedeu-0.3.5

- old
+ new

@@ -20,10 +20,11 @@ # terminal and the `VEDEU_TERM=xterm-truecolor` environment variable set, # a 24-bit representation. # # @todo More documentation required (create a fancy chart!) # @api private + # class Translator include Vedeu::Coercions attr_reader :colour @@ -64,9 +65,20 @@ '' end end alias_method :to_s, :escape_sequence + + # @return [String] + def to_html + if rgb? + colour + + else + '' + + end + end private # @return [Boolean] def no_colour?