fOOrth 0.6.8 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 077b2a26486139e757aa126f2baef39fd727f773
|
4
|
+
data.tar.gz: 8d06e885b72918c5061f29422a906136e752d4a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2f18a3ce3b5079b10f713b2d47b1895d8d1aa695a77b8ce3c608da2cd96af0a1394bcdd7a43886cc682f06f5d9850f42a242a247d3a0f4d542973bac52bd1da
|
7
|
+
data.tar.gz: 09dc8053a52a818d354decfe72e8a8c3ed4cd1a61207410e0115dae3f8872e1476e454b222f5b2191aca328e72c3280cf791c29e44b16cc6a46f83b420ed28b6
|
@@ -52,8 +52,8 @@ class Array
|
|
52
52
|
public
|
53
53
|
|
54
54
|
#Print out the array as bullet points.
|
55
|
-
def puts_foorth_bullets
|
56
|
-
puts foorth_format_bullets
|
55
|
+
def puts_foorth_bullets(page_width)
|
56
|
+
puts foorth_format_bullets(page_width)
|
57
57
|
end
|
58
58
|
|
59
59
|
#Convert the array to strings with bullet points.
|
@@ -65,7 +65,7 @@ class Array
|
|
65
65
|
builder = XfOOrth::BulletPoints.new(page_width)
|
66
66
|
|
67
67
|
self.each do |pair|
|
68
|
-
builder.add(*pair)
|
68
|
+
builder.add(*pair.prepare_bullet_data)
|
69
69
|
end
|
70
70
|
|
71
71
|
builder.render.join("\n").freeze
|
@@ -78,4 +78,13 @@ class Array
|
|
78
78
|
format_foorth_pages(false, page_width)[0] || []
|
79
79
|
end
|
80
80
|
|
81
|
+
#Get data ready for being in a bullet point.
|
82
|
+
def prepare_bullet_data
|
83
|
+
if length < 2
|
84
|
+
["*", self[0]]
|
85
|
+
else
|
86
|
+
self
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
81
90
|
end
|
@@ -6,8 +6,8 @@ class Hash
|
|
6
6
|
# Bullets ========================================================
|
7
7
|
|
8
8
|
#Print out the array as bullet points.
|
9
|
-
def puts_foorth_bullets
|
10
|
-
puts foorth_format_bullets
|
9
|
+
def puts_foorth_bullets(page_width)
|
10
|
+
puts foorth_format_bullets(page_width)
|
11
11
|
end
|
12
12
|
|
13
13
|
#Convert the array to strings with bullet points.
|
data/lib/fOOrth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fOOrth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Camilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|