Module: Makesheets
- Defined in:
- lib/makesheets.rb,
lib/makesheets/version.rb
Overview
Entry point, which validates and deligates the task
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
-
.run(options) ⇒ Object
Validator and Delegator.
Class Method Details
.run(options) ⇒ Object
Validator and Delegator
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/makesheets.rb', line 9 def self.run() #puts options.inspect unless [:infile] puts "[Error]: File path of the spreadsheet is required" exit end unless [:column] puts "[Error]: Key column name must be given" exit end unless Validator::FileValidator.new([:infile]).validate puts "[Error]: #{[:infile]} is not a valid infile!!!" exit end if [:outfile] unless Validator::FileValidator.new([:outfile]).validate puts "[Error]: #{[:outfile]} is not a valid outfile!!!" exit end end if [:skiprows] [:skiprows] = [:skiprows].to_i end if [:readrows] [:readrows] = [:readrows].to_i end Processor.new().process end |