Sha256: c275727b63a2b69eaaa1cdfac996b8ab8b75f47ad9ae31971bad356eaed60047

Contents?: true

Size: 477 Bytes

Versions: 5

Compression:

Stored size: 477 Bytes

Contents

class Image
  attr_accessor :img, :basedir

  def initialize(basedir, img)
    self.basedir = basedir
    self.img = img
  end

  def accepted?
    File.basename(img).match /accepted/
  end

  def current?
    File.basename(img).match /current/
  end

  def diff?
    File.basename(img).match /diff/
  end

  def path
    File.join("/images", img)
  end

  def to_json(options={})
    as_json.to_json
  end

  def as_json
    {
      path: path,
      img: img
    }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
motion-juxtapose-0.3.2 lib/juxtapose/application/lib/image.rb
motion-juxtapose-0.3.1 lib/juxtapose/application/lib/image.rb
motion-juxtapose-0.3.0 lib/juxtapose/application/lib/image.rb
motion-juxtapose-0.2.0 lib/juxtapose/application/lib/image.rb
motion-juxtapose-0.1.1 lib/juxtapose/application/lib/image.rb