class PrismQA::ImageSet

A container for sets of images, with basic sanity checking

Attributes

images[R]

The container for all the images in the set @return [Array] of PrismQA::Image objects

Public Class Methods

new() click to toggle source
# File gem/lib/prism_qa/imageset.rb, line 11
def initialize
  @images = []
  @cache_valid = false  # cache invalidation is so easy
end

Public Instance Methods

add(image) click to toggle source

Safely add images to the container @param [PrismQA::Image] The image to be added

# File gem/lib/prism_qa/imageset.rb, line 18
def add(image)
  allow image
  # fix relative paths
  image.path = File.expand_path(image.path)
  @images << image
  @cache_valid = false
  nil
end
allow(_image) click to toggle source

Raise an error if the image is not appropriate for this type of set @param [PrismQA::Image] The image to be added @throws

# File gem/lib/prism_qa/imageset.rb, line 30
def allow(_image)
  puts "  +++ If you're seeing this, #{self.class.name}.#{__method__} was not overridden"
end