lib/jekyll-bits/picture.rb in jekyll-bits-0.9.2 vs lib/jekyll-bits/picture.rb in jekyll-bits-0.9.3
- old
+ new
@@ -66,11 +66,11 @@
html + '</figure>'
end
private
- @home = nil
+ @@home = nil
def uri(page)
uri = ''
uri = page['image'] if page['image']
yaml = page['jb_picture']
@@ -85,18 +85,18 @@
uri = home + uri.to_s unless %w(http https).include?(uri.scheme)
uri.to_s
end
def home
- if @home.nil?
- @home = Jekyll.configuration({})['url']
- if @home.nil?
- @home = ''
+ if @@home.nil?
+ @@home = Jekyll.configuration({})['url']
+ if @@home.nil?
+ @@home = ''
else
- @home.gsub!(%r{/$}, '')
+ @@home.gsub!(%r{/$}, '')
end
end
- @home
+ @@home
end
end
# Box for testing and calling static methods.
class JbBox