Class: ImageOptimizer
- Inherits:
-
Object
- Object
- ImageOptimizer
- Defined in:
- lib/image_optimizer.rb,
lib/image_optimizer/version.rb,
lib/image_optimizer/png_optimizer.rb,
lib/image_optimizer/jpeg_optimizer.rb
Defined Under Namespace
Classes: JPEGOptimizer, PNGOptimizer
Constant Summary collapse
- VERSION =
'1.2.1'
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ ImageOptimizer
constructor
A new instance of ImageOptimizer.
- #optimize ⇒ Object
Constructor Details
#initialize(path, options = {}) ⇒ ImageOptimizer
Returns a new instance of ImageOptimizer.
8 9 10 11 |
# File 'lib/image_optimizer.rb', line 8 def initialize(path, = {}) @path = path @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/image_optimizer.rb', line 6 def @options end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/image_optimizer.rb', line 6 def path @path end |
Instance Method Details
#optimize ⇒ Object
13 14 15 16 |
# File 'lib/image_optimizer.rb', line 13 def optimize JPEGOptimizer.new(path, ).optimize PNGOptimizer.new(path, ).optimize end |