Sha256: b6902e2be31956131cbcfcc04089bcdd81eefd187878a01cd01c89e74c908973

Contents?: true

Size: 740 Bytes

Versions: 3

Compression:

Stored size: 740 Bytes

Contents

# -*- encoding : utf-8 -*-
class Hirb::Helpers::UnicodeTable < Hirb::Helpers::Table
  CHARS = {
    :top => {
      :left => "┌",
      :center => "┬",
      :right => "┐",
      :horizontal => "─",
      :vertical => {
        :outside => "│",
        :inside => "│",
      },
    },

    :middle => {
      :left => "├",
      :center => "┼",
      :right => "┤",
      :horizontal => "─",
    },

    :bottom => {
      :left => "└",
      :center => "┴",
      :right => "┘",
      :horizontal => "─",
      :vertical => {
        :outside => "│",
        :inside => "╎",
      },
    },
  }.freeze

  # Renders a unicode table
  def self.render(rows, options={})
    new(rows, options).render
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hirber-0.8.7 lib/hirb/helpers/unicode_table.rb
hirber-0.8.6 lib/hirb/helpers/unicode_table.rb
hirber-0.8.5 lib/hirb/helpers/unicode_table.rb