Class | Paperclip::Style |
In: |
lib/paperclip/style.rb
|
Parent: | Object |
The Style class holds the definition of a thumbnail style, applying whatever processing is required to normalize the definition and delaying the evaluation of block parameters until useful context is available.
attachment | [R] | |
format | [R] | |
name | [R] |
Creates a Style object. name is the name of the attachment, definition is the style definition from has_attached_file, which can be string, array or hash
Supports getting and setting style properties with hash notation to ensure backwards-compatibility eg. @attachment.styles[:large][:geometry]@ will still work
Supplies the hash of options that processors expect to receive as their second argument Arguments other than the standard geometry, format etc are just passed through from initialization and any procs are called here, just before post-processing.
retrieves from the attachment the processors defined in the has_attached_file call (which method (in the attachment) will call any supplied procs) There is an important change of interface here: a style rule can set its own processors by default we behave as before, though. if a proc has been supplied, we call it here