Class: Panchira::ImageResolver
- Defined in:
- lib/panchira/resolvers/image_resolver.rb
Constant Summary collapse
- URL_REGEXP =
/\.(png|gif|jpg|jpeg|webp)$/.freeze
Instance Method Summary collapse
Methods inherited from Resolver
Constructor Details
This class inherits a constructor from Panchira::Resolver
Instance Method Details
#fetch ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/panchira/resolvers/image_resolver.rb', line 7 def fetch result = PanchiraResult.new result.canonical_url = @url result.image = PanchiraImage.new result.image.url = @url result.image.width, result.image.height = FastImage.size(result.image.url) result.resolver = parse_resolver result end |