Sha256: cd436e2bd1089faae4189c9f18c77aa2e9bee34037f04fe418cebdb90f700413

Contents?: true

Size: 400 Bytes

Versions: 12

Compression:

Stored size: 400 Bytes

Contents

module ANSI

  module Terminal
    require 'curses'

    module_function

    #CHARACTER_MODE = "curses"    # For Debugging purposes only.

    #
    # Curses savvy getc().
    #
    #
    def get_character(input = STDIN)
      Curses.getch()
    end

    def terminal_size
      Curses.init_screen
      w, r = Curses.cols, Curses.rows
      Curses.close_screen
      return r, w
    end

  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ansi-1.4.1 lib/ansi/terminal/curses.rb
ansi-1.4.0 lib/ansi/terminal/curses.rb
ansi-1.3.0 lib/ansi/terminal/curses.rb
ansi-1.2.5 lib/ansi/terminal/curses.rb
ansi-1.2.4 lib/ansi/terminal/curses.rb
ansi-1.2.3 lib/ansi/terminal/curses.rb
ansi-1.2.2 lib/ansi/terminal/curses.rb
ansi-1.2.1 lib/ansi/terminal/curses.rb
ansi-1.2.0 lib/ansi/terminal/curses.rb
ansi-1.1.0 lib/ansi/terminal/curses.rb
ansi-1.0.1 lib/ansi/terminal/curses.rb
ansi-1.0.0 lib/ansi/terminal/curses.rb