Sha256: 6e7ed917d8ea7b1b9051f1f66a8135a845794f45fd2f6e583b1460c7cb29e43c

Contents?: true

Size: 381 Bytes

Versions: 11

Compression:

Stored size: 381 Bytes

Contents

module Vedeu
  class Position
    class << self
      def set(y = nil, x = nil)
        return '' if y.nil? || x.nil?

        new(y, x).set
      end

      def reset
        new(1, 1).set
      end
    end

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

    def set
      [Esc.esc, y, ';', x, 'H'].join
    end

    private

    attr_accessor :y, :x
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
vedeu-0.0.21 lib/vedeu/output/position.rb
vedeu-0.0.20 lib/vedeu/output/position.rb
vedeu-0.0.19 lib/vedeu/output/position.rb
vedeu-0.0.18 lib/vedeu/output/position.rb
vedeu-0.0.17 lib/vedeu/output/position.rb
vedeu-0.0.16 lib/vedeu/output/position.rb
vedeu-0.0.15 lib/vedeu/output/position.rb
vedeu-0.0.14 lib/vedeu/output/position.rb
vedeu-0.0.13 lib/vedeu/output/position.rb
vedeu-0.0.12 lib/vedeu/output/position.rb
vedeu-0.0.11 lib/vedeu/output/position.rb