class JekyllLazyLoadImage::Config

Constants

ALLOWED_JEKYLL_HOOK_CONTAINERS
DEFAULT_CONTAINERS

Public Instance Methods

owners() click to toggle source
# File lib/jekyll-lazy-load-image/config.rb, line 8
def owners
  @owners || DEFAULT_CONTAINERS
end
owners=(value) click to toggle source
# File lib/jekyll-lazy-load-image/config.rb, line 12
def owners=(value)
  return if value.nil? || value.empty?

  @owners = Array(value).map(&:to_sym).tap do |owners_prospective|
    not_allowed_hooks = ALLOWED_JEKYLL_HOOK_CONTAINERS & owners_prospective
    raise ArgumentError, "The owners option must be #{ALLOWED_JEKYLL_HOOK_CONTAINERS.join(" or ")}." if not_allowed_hooks.size.zero?
  end
end