Class: ImageOptim::Runner
- Inherits:
-
Object
- Object
- ImageOptim::Runner
- Defined in:
- lib/image_optim/runner.rb
Overview
Handling optimization using image_optim binary
Defined Under Namespace
Classes: Results
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args, options) ⇒ Runner
constructor
A new instance of Runner.
- #run! ⇒ Object
Constructor Details
#initialize(args, options) ⇒ Runner
Returns a new instance of Runner.
46 47 48 49 50 51 52 |
# File 'lib/image_optim/runner.rb', line 46 def initialize(args, ) fail 'specify paths to optimize' if args.empty? = HashHelpers.deep_symbolise_keys() @recursive = .delete(:recursive) @image_optim = ImageOptim.new() @to_optimize = find_to_optimize(args) end |
Class Method Details
.run!(args, options) ⇒ Object
68 69 70 |
# File 'lib/image_optim/runner.rb', line 68 def self.run!(args, ) new(args, ).run! end |