Class: Jekyll::Images::Cache

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll/images/cache.rb

Overview

Cache

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.siteObject

Returns the value of attribute site.



8
9
10
# File 'lib/jekyll/images/cache.rb', line 8

def site
  @site
end

Class Method Details

.cached_image(input) ⇒ Object



18
19
20
# File 'lib/jekyll/images/cache.rb', line 18

def cached_image(input)
  cached_images[input] ||= Jekyll::Images::Image.new(site, input)
end

.cached_image?(input) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/jekyll/images/cache.rb', line 14

def cached_image?(input)
  cached_images.key? input
end

.cached_imagesObject



10
11
12
# File 'lib/jekyll/images/cache.rb', line 10

def cached_images
  @cached_images ||= {}
end