Module: Dragonfly::Job::OverrideInstanceMethods
- Defined in:
- lib/dragonfly/job.rb
Overview
This is needed because we need a way of overriding the methods added to Job objects by the analyser and by the job shortcuts like 'thumb', etc. If we had traits/classboxes in ruby maybe this wouldn't be needed Think of it as like a normal instance method but with a css-like !important after it
Instance Method Summary (collapse)
Instance Method Details
- (Object) format
213 214 215 216 |
# File 'lib/dragonfly/job.rb', line 213 def format apply [:format] || (ext.to_sym if ext && app.trust_file_extensions) || analyse(:format) end |
- (Object) mime_type
218 219 220 |
# File 'lib/dragonfly/job.rb', line 218 def mime_type app.mime_type_for(format) || analyse(:mime_type) || app.fallback_mime_type end |
- (Object) to_s
222 223 224 |
# File 'lib/dragonfly/job.rb', line 222 def to_s super.sub(/#<Class:\w+>/, 'Extended Dragonfly::Job') end |