Skip to content

Commit 34624fb

Browse files
committed
Add UnicodePlot.border_types
1 parent 1a5e054 commit 34624fb

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

lib/unicode_plot/renderer.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ module BorderMaps
4040
barplot: BorderMaps::BORDER_BARPLOT,
4141
}.freeze
4242

43+
def self.border_types
44+
BORDER_MAP.keys
45+
end
46+
4347
module BorderPrinter
4448
include StyledPrinter
4549

test/test-utils.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ class UnicodePlotTest < Test::Unit::TestCase
44
assert_equal(available_canvas_types,
55
UnicodePlot.canvas_types)
66
end
7+
8+
test("UnicodePlot.border_types") do
9+
available_border_types = [:solid, :corners, :barplot]
10+
assert_equal(available_border_types.sort,
11+
UnicodePlot.border_types.sort)
12+
end
713
end

0 commit comments

Comments
 (0)