rows arg in save_sheet is always respected

fixes #332
This commit is contained in:
Andy Meneely
2021-05-13 22:39:52 -04:00
parent b50a3270a4
commit f8c0e1b129
5 changed files with 101 additions and 8 deletions
+3 -8
View File
@@ -82,14 +82,9 @@ module Squib::Args
def validate_rows(arg)
raise 'columns must be an integer' unless columns.respond_to? :to_i
count = if range == :all
@deck.size
else
count = range.to_a.length
end
return 1 if count <= columns
return arg if arg.respond_to? :to_i
(count.to_f / columns.to_f).ceil
count = (range == :all) ? @deck.size : count = range.to_a.length
return arg.to_i if arg.respond_to? :to_i
(count.to_f / columns.to_f).ceil # e.g. :infinite
end
def full_filename(i=nil)