Class: Jpegoptim::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/jpegoptim.rb

Overview

Result structure.

Contains members :success and :errors. Sucess member contains hash of successfully optimized files with ratio as value. Zero or positive percent ratio means the same as file has been skipped. It’s negative number against the number reported by jpegoptim so it means new size against the old size.

Errors contains array with pairs where first member of the pair is filename and second the message. First one can be null if message isn’t strictly associated with file. As unassociated messages are considered all errors beginning by the jpegoptim: string althoug these are usually written to the error output so generaly unhandled and written out to error output of the application instead.

Be warn, unassociated message is can’t open error too, so double check, file exists if desired result is critical.

Instance Attribute Summary collapse

Instance Attribute Details

#errorsObject

Returns the value of attribute errors

Returns:

  • (Object)

    the current value of errors



41
42
43
# File 'lib/jpegoptim.rb', line 41

def errors
  @errors
end

#succeedObject

Returns the value of attribute succeed

Returns:

  • (Object)

    the current value of succeed



41
42
43
# File 'lib/jpegoptim.rb', line 41

def succeed
  @succeed
end