Sha256: c025958f002f01ed530a0873867dec40fcda4ecf0117970ad1941f2fb60e98ea

Contents?: true

Size: 821 Bytes

Versions: 3

Compression:

Stored size: 821 Bytes

Contents

module Vedeu
  module Esc
    extend self

    def blink
      [esc, '5m'].join
    end

    def blink_off
      [esc, '25m'].join
    end

    def bold
      [esc, '1m'].join
    end
    alias_method :bright, :bold

    def bold_off
      [esc, '21m'].join
    end

    def clear
      [esc, '2J'].join
    end

    def clear_line
      [esc, '2K'].join
    end

    def esc
      [27.chr, '['].join
    end

    def negative
      [esc, '7m'].join
    end
    alias_method :reverse, :negative
    alias_method :inverse, :negative

    def positive
      [esc, '27m'].join
    end

    def normal
      [esc, '2m'].join
    end
    alias_method :dim, :normal

    def reset
      [esc, '0m'].join
    end

    def underline
      [esc, '4m'].join
    end

    def underline_off
      [esc, '24m'].join
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vedeu-0.0.22 lib/vedeu/output/esc.rb
vedeu-0.0.21 lib/vedeu/output/esc.rb
vedeu-0.0.20 lib/vedeu/output/esc.rb