gsmetrics 0.1.3 → 0.1.4
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/Gemfile.lock +1 -1
- data/gsmetrics.gemspec +1 -1
- data/lib/gsmetrics/gsmetrics.rb +6 -0
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/gsmetrics.gemspec
CHANGED
data/lib/gsmetrics/gsmetrics.rb
CHANGED
|
@@ -12,6 +12,8 @@ module GSMetrics
|
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
class Error < RuntimeError
|
|
16
|
+
end
|
|
15
17
|
private
|
|
16
18
|
class Worksheet
|
|
17
19
|
attr_accessor :check_worksheet_size
|
|
@@ -52,6 +54,10 @@ private
|
|
|
52
54
|
worksheet.save
|
|
53
55
|
end
|
|
54
56
|
|
|
57
|
+
def save! row_id = nil
|
|
58
|
+
raise GSMetrics::Error.new('Save failed') unless save(row_id)
|
|
59
|
+
end
|
|
60
|
+
|
|
55
61
|
def set_worksheet_size size
|
|
56
62
|
worksheet.max_rows = size unless worksheet.max_rows >= size
|
|
57
63
|
end
|