Sha256: cbb5962e2fb6fc35f4f0779f447f09a10c4bcee9a909b93830f70fe36123a092

Contents?: true

Size: 386 Bytes

Versions: 1

Compression:

Stored size: 386 Bytes

Contents

module JarEd
  class Screen
    attr_reader :lines, :cursor_column, :cursor_row

    # @todo Rename these to cursor_row/column
    def initialize(lines:, cursor_column:, cursor_row:)
      @lines = lines
      @cursor_column = cursor_column
      @cursor_row = cursor_row
    end

    def width
      lines.map(&:length).max
    end

    def height
      lines.length
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jareditor-3.0.0 lib/jared/screen.rb