Sha256: 94bd713f865179831ae9412e3206d411242d634d9c9f41423d5287f0f7a5345a

Contents?: true

Size: 266 Bytes

Versions: 8

Compression:

Stored size: 266 Bytes

Contents

module Screen
  extend self

  def clear!
    print "\e[2J\e[f"
  end

  def height
    `tput lines`.to_i
  end

  def suggest(x, y)
    y.times do |n|
      print "\n" if n.nonzero?
      print "\u2588" * x
    end
  end

  def width
    `tput cols`.to_i
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tp-0.4.1 lib/screen.rb
tp-0.4.0 lib/screen.rb
tp-0.3.1 lib/screen.rb
tp-0.3.0 lib/screen.rb
tp-0.2.1 lib/screen.rb
tp-0.2.0 lib/screen.rb
tp-0.1.1 lib/screen.rb
tp-0.1.0 lib/screen.rb