Sha256: d7c42cb03248094e4bdedd5d0b88fd5171b1090b1a86ce887682a67e59bc182f

Contents?: true

Size: 583 Bytes

Versions: 13

Compression:

Stored size: 583 Bytes

Contents

module Vedeu

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

    private

    # @return [String]
    def named_codes
      Vedeu::Esc.background_codes[colour]
    end

    # @return [String]
    def numbered_prefix
      "\e[48;5;"
    end

    # @return [Vedeu::Backgrounds]
    def repository
      Vedeu.background_colours
    end

    # @return [String]
    def rgb_prefix
      "\e[48;2;%s;%s;%sm"
    end

  end # Background

end # Vedeu

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vedeu-0.4.53 lib/vedeu/output/background.rb
vedeu-0.4.52 lib/vedeu/output/background.rb
vedeu-0.4.51 lib/vedeu/output/background.rb
vedeu-0.4.50 lib/vedeu/output/background.rb
vedeu-0.4.49 lib/vedeu/output/background.rb
vedeu-0.4.48 lib/vedeu/output/background.rb
vedeu-0.4.47 lib/vedeu/output/background.rb
vedeu-0.4.46 lib/vedeu/output/background.rb
vedeu-0.4.45 lib/vedeu/output/background.rb
vedeu-0.4.44 lib/vedeu/output/background.rb
vedeu-0.4.43 lib/vedeu/output/background.rb
vedeu-0.4.42 lib/vedeu/output/background.rb
vedeu-0.4.41 lib/vedeu/output/background.rb