lib/selfie/camera.rb
def capture
      sleep 0.2

      images = Dir[@glob]
      return if images.none? || images.last == @captured.last

      @captured << images.last
      FileUtils.rm_f(images - @captured)

      @captured.last
    end
# Some hacks to make it seem like capture() takes a picture
# without accumulating a ton of unused images.
Some hacks to make it seem like capture() takes a picture
without accumulating a ton of unused images.
Some hacks to make it seem like capture () takes a picture without accumulating a ton of unused images .
def capture
      sleep 0.2
      images = Dir[@glob]
      return if images.none? || images.last == @captured.last
      @captured << images.last
      FileUtils.rm_f(images - @captured)
      @captured.last
    end
def capture sleep 0.2 images = Dir [ @glob ] return if images . none? || images . last == @captured . last @captured << images . last FileUtils . rm_f ( images - @captured ) @captured . last end
Some hacks to make it seem like capture() takes a picture
without accumulating a ton of unused images.
Some hacks to make it seem like capture () takes a picture without accumulating a ton of unused images .