Sha256: 6d3deb9f7c8a8662854dbff5c661d96de0fcdec517d5002a79b48d76304b5f21

Contents?: true

Size: 250 Bytes

Versions: 19

Compression:

Stored size: 250 Bytes

Contents

# encoding: utf-8
module Shelr
  class Terminal
    def size
      height, width = `stty size`.split(' ')
      { :height => height.to_i, :width => width.to_i }
    end

    def puts_line
      STDOUT.puts "-=" * (size[:width] / 2)
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
shelr-0.16.3 lib/shelr/terminal.rb
shelr-0.16.2 lib/shelr/terminal.rb
shelr-0.16.1 lib/shelr/terminal.rb
shelr-0.16.0 lib/shelr/terminal.rb
shelr-0.15.2 lib/shelr/terminal.rb
shelr-0.15.1 lib/shelr/terminal.rb
shelr-0.15.0 lib/shelr/terminal.rb
shelr-0.14.1 lib/shelr/terminal.rb
shelr-0.14.0 lib/shelr/terminal.rb
shelr-0.13.3 lib/shelr/terminal.rb
shelr-0.13.2 lib/shelr/terminal.rb
shelr-0.13.1 lib/shelr/terminal.rb
shelr-0.13.0 lib/shelr/terminal.rb
shelr-0.12.9 lib/shelr/terminal.rb
shelr-0.12.8 lib/shelr/terminal.rb
shelr-0.12.7 lib/shelr/terminal.rb
shelr-0.12.6 lib/shelr/terminal.rb
shelr-0.12.5 lib/shelr/terminal.rb
shelr-0.12.4 lib/shelr/terminal.rb