Updated for version 0.6.9

This commit is contained in:
Peter Camilleri 2016-11-03 11:52:24 -04:00
parent 22899e4962
commit 6dc2b19d4e
5 changed files with 20 additions and 6 deletions

Binary file not shown.

View file

@ -52,8 +52,8 @@ class Array
public
#Print out the array as bullet points.
def puts_foorth_bullets
puts foorth_format_bullets
def puts_foorth_bullets(page_width)
puts foorth_format_bullets(page_width)
end
#Convert the array to strings with bullet points.
@ -65,7 +65,7 @@ class Array
builder = XfOOrth::BulletPoints.new(page_width)
self.each do |pair|
builder.add(*pair)
builder.add(*pair.prepare_bullet_data)
end
builder.render.join("\n").freeze
@ -78,4 +78,13 @@ class Array
format_foorth_pages(false, page_width)[0] || []
end
#Get data ready for being in a bullet point.
def prepare_bullet_data
if length < 2
["*", self[0]]
else
self
end
end
end

View file

@ -6,8 +6,8 @@ class Hash
# Bullets ========================================================
#Print out the array as bullet points.
def puts_foorth_bullets
puts foorth_format_bullets
def puts_foorth_bullets(page_width)
puts foorth_format_bullets(page_width)
end
#Convert the array to strings with bullet points.

View file

@ -8,6 +8,11 @@ class Object
self.to_s.format_description(max_width)
end
#Get data ready for being in a bullet point.
def prepare_bullet_data
["*", self]
end
end

View file

@ -3,5 +3,5 @@
#* version.rb - The version string for fOOrth.
module XfOOrth
#The version string for fOOrth.
VERSION = "0.6.8"
VERSION = "0.6.9"
end