Sha256: 764daa0873b6be722a87f6edce6f48613f1797efa7d95f54fecaf3b4c6bf2026
Contents?: true
Size: 620 Bytes
Versions: 5
Compression:
Stored size: 620 Bytes
Contents
class Spec attr_accessor :path, :basedir def initialize(basedir, path) self.basedir = basedir self.path = path end def images Dir.glob(File.join(path, '*.png')).map do |img| Image.new(basedir, img) end end def name path.gsub(basedir, '') end def to_json as_json.to_json end def accepted images.select(&:accepted?).first end def current images.select(&:current?).first end def diff images.select(&:diff?).first end def as_json { directory: path, accepted: accepted, current: current, diff: diff } end end
Version data entries
5 entries across 5 versions & 1 rubygems