Class: Pageflow::ThumbnailFileResolver
- Inherits:
-
Struct
- Object
- Struct
- Pageflow::ThumbnailFileResolver
- Defined in:
- app/models/pageflow/thumbnail_file_resolver.rb
Defined Under Namespace
Classes: Null
Instance Attribute Summary collapse
-
#candidates ⇒ Object
Returns the value of attribute candidates.
-
#configuration ⇒ Object
Returns the value of attribute configuration.
Instance Method Summary collapse
Instance Attribute Details
#candidates ⇒ Object
Returns the value of attribute candidates
2 3 4 |
# File 'app/models/pageflow/thumbnail_file_resolver.rb', line 2 def candidates @candidates end |
#configuration ⇒ Object
Returns the value of attribute configuration
2 3 4 |
# File 'app/models/pageflow/thumbnail_file_resolver.rb', line 2 def configuration @configuration end |
Instance Method Details
#find ⇒ Object
13 14 15 16 17 |
# File 'app/models/pageflow/thumbnail_file_resolver.rb', line 13 def find candidates.reduce(nil) do |result, candidate| result || file_model(candidate).find_by_id(record_id(candidate)) end || Null.new end |