Class: Imagesorter::Cmd
- Inherits:
-
Object
- Object
- Imagesorter::Cmd
- Defined in:
- lib/imagesorter/cmd.rb
Instance Attribute Summary collapse
-
#progressbar ⇒ Object
readonly
Returns the value of attribute progressbar.
Instance Method Summary collapse
-
#initialize ⇒ Cmd
constructor
A new instance of Cmd.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Cmd
Returns a new instance of Cmd.
11 12 13 |
# File 'lib/imagesorter/cmd.rb', line 11 def initialize = Imagesorter::OptionParser.parse(ARGV) end |
Instance Attribute Details
#progressbar ⇒ Object (readonly)
Returns the value of attribute progressbar.
9 10 11 |
# File 'lib/imagesorter/cmd.rb', line 9 def end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/imagesorter/cmd.rb', line 15 def run setup_logger setup_locale Imagesorter::FileBatchProcessor.new().execute! finalize puts 'DONE' exit 0 rescue Interrupt puts 'FAIL: INTERRUPTED' exit 1 rescue => e puts e exit 2 end |