Sha256: 56f4ed4007e2156138de5a47905ad9c8375e8f504b1d44d00f3f21348fdb1006

Contents?: true

Size: 589 Bytes

Versions: 8

Compression:

Stored size: 589 Bytes

Contents

module Vedeu

  # The class represents one half (the other, can be found at
  # {Vedeu::Background}) of a terminal colour escape sequence.
  #
  # @api private
  class Foreground < Vedeu::Translator

    private

    # @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"
    end

  end # Foreground

end # Vedeu

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vedeu-0.4.40 lib/vedeu/output/foreground.rb
vedeu-0.4.39 lib/vedeu/output/foreground.rb
vedeu-0.4.38 lib/vedeu/output/foreground.rb
vedeu-0.4.37 lib/vedeu/output/foreground.rb
vedeu-0.4.36 lib/vedeu/output/foreground.rb
vedeu-0.4.35 lib/vedeu/output/foreground.rb
vedeu-0.4.34 lib/vedeu/output/foreground.rb
vedeu-0.4.33 lib/vedeu/output/foreground.rb