Class: Pageflow::ThumbnailFileResolver

Inherits:
Struct
  • Object
show all
Defined in:
app/models/pageflow/thumbnail_file_resolver.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#candidatesObject

Returns the value of attribute candidates

Returns:

  • (Object)

    the current value of candidates



2
3
4
# File 'app/models/pageflow/thumbnail_file_resolver.rb', line 2

def candidates
  @candidates
end

#configurationObject

Returns the value of attribute configuration

Returns:

  • (Object)

    the current value of configuration



2
3
4
# File 'app/models/pageflow/thumbnail_file_resolver.rb', line 2

def configuration
  @configuration
end

Instance Method Details

#findObject



3
4
5
6
7
# File 'app/models/pageflow/thumbnail_file_resolver.rb', line 3

def find
  candidates.reduce(nil) do |result, candidate|
    result || find_positioned_file_by_candiate(candidate)
  end || PositionedFile.null
end