catsheet 1.1.2 → 1.1.3
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.
- data/lib/catsheet.rb +9 -8
- metadata +3 -3
data/lib/catsheet.rb
CHANGED
@@ -16,6 +16,15 @@ module Catsheet
|
|
16
16
|
exit 1
|
17
17
|
end
|
18
18
|
|
19
|
+
private
|
20
|
+
|
21
|
+
# Return the length of the string, taking multibyte characters into account.
|
22
|
+
def self.string_length(string)
|
23
|
+
return string.scan(/./mu).size
|
24
|
+
end
|
25
|
+
|
26
|
+
public
|
27
|
+
|
19
28
|
def self.main
|
20
29
|
# Check if the name of a spreadsheet was supplied.
|
21
30
|
if ARGV[0].nil?
|
@@ -87,13 +96,5 @@ module Catsheet
|
|
87
96
|
puts result
|
88
97
|
end
|
89
98
|
end
|
90
|
-
|
91
|
-
private
|
92
|
-
|
93
|
-
# Return the length of the string, taking multibyte characters into account.
|
94
|
-
def string_length(string)
|
95
|
-
return string.scan(/./mu).size
|
96
|
-
end
|
97
|
-
|
98
99
|
end
|
99
100
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catsheet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 3
|
10
|
+
version: 1.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Abe van der Wielen
|