lib/link_thumbnailer/models/image.rb in link_thumbnailer-2.0.4 vs lib/link_thumbnailer/models/image.rb in link_thumbnailer-2.1.0
- old
+ new
@@ -7,13 +7,13 @@
module Models
class Image < ::LinkThumbnailer::Model
attr_reader :src, :type, :size
- def initialize(src)
+ def initialize(src, size = nil, type = nil)
@src = src
- @size = parser.size(self)
- @type = parser.type(self)
+ @size = size || parser.size(self)
+ @type = type || parser.type(self)
end
def to_s
src.to_s
end