Sha256: 2eb07bec9c1e43d73dfa65f139931e53647cac7553530cfce74fc2ed20c121de

Contents?: true

Size: 714 Bytes

Versions: 1

Compression:

Stored size: 714 Bytes

Contents

module Vedeu
  module Cursor
    extend self

    def show
      [Esc.esc, '?25h'].join
    end

    def hide
      [Esc.esc, '?25l'].join
    end

    def home
      [Esc.esc, 'H'].join
    end

    def up(count = 1)
      [Esc.esc, "#{count || 1}", 'A'].join
    end

    def down(count = 1)
      [Esc.esc, "#{count || 1}", 'B'].join
    end

    def right(count = 1)
      [Esc.esc, "#{count || 1}", 'C'].join
    end

    def left(count = 1)
      [Esc.esc, "#{count || 1}", 'D'].join
    end

    def save
      [Esc.esc, 's'].join
    end

    def restore
      [Esc.esc, 'u'].join
    end

    def save_all
      [Esc.esc, '7'].join
    end

    def restore_all
      [Esc.esc, '8'].join
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.0.25 lib/vedeu/output/cursor.rb