lib/jekyll/assets/liquid/drop.rb in jekyll-assets-2.0.3 vs lib/jekyll/assets/liquid/drop.rb in jekyll-assets-2.1.0
- old
+ new
@@ -1,10 +1,10 @@
# Frozen-string-literal: true
# Copyright: 2012-2015 - MIT License
# Encoding: utf-8
-require "fastimage"
+autoload :FastImage, "fastimage"
module Jekyll
module Assets
module Liquid
class Drop < ::Liquid::Drop
@@ -42,17 +42,17 @@
end
end
private
def image?
- %(image/png image/jpeg image/gif).include?(
+ %W(image/png image/jpeg image/gif).include?(
asset.content_type
)
end
private
def asset
- return @asset ||= @jekyll.sprockets.find_asset(@path)
+ @asset ||= @jekyll.sprockets.find_asset(@path)
end
end
end
end
end