class Ficon::Image
Attributes
area[R]
size[R]
url[R]
Public Class Methods
new(url)
click to toggle source
# File lib/ficon/image.rb, line 9 def initialize(url) @url = url c = Cache.new(@url) @size = Cache.new(url).data || FastImage.size(url) c.data = @size @area = @size&.inject(&:*) || 0 end
Public Instance Methods
to_s()
click to toggle source
# File lib/ficon/image.rb, line 17 def to_s @url.to_s + " (#{@size})" end