You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
707 B
38 lines
707 B
require 'squib/args/arg_loader' |
|
|
|
module Squib |
|
# @api private |
|
module Args |
|
class SaveBatch |
|
include ArgLoader |
|
|
|
def initialize #TODO DSL method default for prefix |
|
end |
|
|
|
def self.parameters |
|
{ dir: '_output', |
|
prefix: 'card_', |
|
count_format: '%02d', |
|
rotate: false, |
|
} |
|
end |
|
|
|
def self.expanding_parameters |
|
[] # none of them |
|
end |
|
|
|
def self.params_with_units |
|
[] # none of them |
|
end |
|
|
|
def validate_dir(arg) |
|
unless Dir.exists?(arg) |
|
Squib.logger.warn("Dir '#{arg}' does not exist, creating it.") |
|
Dir.mkdir arg |
|
end |
|
return arg |
|
end |
|
|
|
end |
|
end |
|
end
|
|
|