Sha256: 1980eb8ca3d11a41dbf60cf3442f9d70e7315de397e509a60bc4bc463af8663d

Contents?: true

Size: 365 Bytes

Versions: 10

Compression:

Stored size: 365 Bytes

Contents

module TTY
  class Table
    class Empty < TTY::Table

      ZERO_ROW = [].freeze

      def self.new(header, rows = ZERO_ROW)
        super.new(header, rows)
      end

      def each
        return to_enum unless block_given?
        self
      end

      def size
        0
      end

      def width
        0
      end

    end # Empty
  end # Table
end # TTY

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tty-table-0.10.0 lib/tty/table/empty.rb
tty-table-0.9.0 lib/tty/table/empty.rb
tty-table-0.8.0 lib/tty/table/empty.rb
tty-table-0.7.0 lib/tty/table/empty.rb
tty-table-0.6.0 lib/tty/table/empty.rb
tty-table-0.5.0 lib/tty/table/empty.rb
tty-table-0.4.0 lib/tty/table/empty.rb
tty-table-0.3.0 lib/tty/table/empty.rb
tty-table-0.2.0 lib/tty/table/empty.rb
tty-table-0.1.0 lib/tty/table/empty.rb