Sha256: 9143882f31f7b261368936363766373b28467bae8d6d5169bd735f21ec9f5b24

Contents?: true

Size: 307 Bytes

Versions: 1

Compression:

Stored size: 307 Bytes

Contents

module Termtable
  class Border
    def initialize(**opts)
      @columns = opts.delete(:columns)
      @style   = opts.delete(:style) || '-'
      @corner  = opts.delete(:corners) || '+'
    end

    def render
      @corner + @columns.map { |col| @style * col }.join(@corner) << @corner
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
termtable-0.1.0 lib/termtable/border.rb