class Build::Files::Difference

Attributes

files[R]

Public Class Methods

new(list, excludes) click to toggle source
# File lib/build/files/difference.rb, line 26
def initialize(list, excludes)
        @list = list
        @excludes = excludes
end

Public Instance Methods

-(list) click to toggle source
# File lib/build/files/difference.rb, line 48
def -(list)
        self.class.new(@list, Composite.new(@excludes, list))
end
each() { |path| ... } click to toggle source
# File lib/build/files/difference.rb, line 40
def each
        return to_enum(:each) unless block_given?
        
        @list.each do |path|
                yield path unless @excludes.include?(path)
        end
end
freeze() click to toggle source
Calls superclass method
# File lib/build/files/difference.rb, line 33
def freeze
        @list.freeze
        @excludes.freeze
        
        super
end
include?(path) click to toggle source
# File lib/build/files/difference.rb, line 52
def include?(path)
        @list.includes?(path) and !@excludes.include?(path)
end
inspect() click to toggle source
# File lib/build/files/difference.rb, line 60
def inspect
        "<Difference #{@files.inspect} - #{@excludes.inspect}>"
end
rebase(root) click to toggle source
# File lib/build/files/difference.rb, line 56
def rebase(root)
        self.class.new(@files.collect{|list| list.rebase(root)}, [root])
end