Sha256: 8f7bb35c5db74ca37d192863c16bbf2bd566fe3cc8e97fdb571cdb39b06b7eeb

Contents?: true

Size: 329 Bytes

Versions: 4

Compression:

Stored size: 329 Bytes

Contents

module Vedeu
  class Position
    class << self
      def set(y = 0, x = 0)
        new(y, x).set
      end
      alias_method :reset, :set
    end

    def initialize(y = 0, x = 0)
      @y, @x = y, x
    end

    def set
      [Esc.esc, (y + 1), ';', (x + 1), 'H'].join
    end

    private

    attr_accessor :y, :x
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vedeu-0.0.7 lib/vedeu/output/position.rb
vedeu-0.0.6 lib/vedeu/output/position.rb
vedeu-0.0.5 lib/vedeu/output/position.rb
vedeu-0.0.4 lib/vedeu/output/position.rb