Sha256: c79f5391f1d0d296f9581089543e35de78f3baf7b0c23c1d5c50cfc89fdf2c0b
Contents?: true
Size: 570 Bytes
Versions: 8
Compression:
Stored size: 570 Bytes
Contents
module Mireru class Container def initialize(files=[]) @files = files.select {|file| file?(file) } end def empty? @files.empty? end def pop(complement_file=nil) @files.unshift(complement_file) if complement_file @files.pop end def shift(complement_file=nil) @files.push(complement_file) if complement_file @files.shift end private def file?(file) unless file return false end unless File.file?(file) return false end true end end end
Version data entries
8 entries across 8 versions & 1 rubygems