Sha256: c6d043c085ce4d8e6c7d8524419e5a21639ecad795e6bd8e515b2d8f8ee1000f

Contents?: true

Size: 445 Bytes

Versions: 19

Compression:

Stored size: 445 Bytes

Contents

module SproutCore
  class FileRule
    
    def initialize(exp, mode)
      @mode = mode
      @expression = Regexp.new(exp)
    end
    
    # Decides whether or not a file should be included.
    # Returns either true, false, or nil (for not a match at all)
    def include?(file)
      ret = (@mode == :deny) ? false : true
      
      if file =~ @expression
        return ret
      else
        return nil
      end
    end
    
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
sproutcore-1.11.0 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.11.0.rc3 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.11.0.rc2 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.11.0.rc1 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.10.3.1 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.10.2 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.10.1 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.10.0 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.10.0.rc.3 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.10.0.rc.2 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.10.0.rc.1 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.9.2 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.9.1 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.9.0 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.8.2.1 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.8.1 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.8.0 lib/buildtasks/helpers/file_rule.rb
sproutcore-1.7.1.beta-java lib/buildtasks/helpers/file_rule.rb
sproutcore-1.7.1.beta lib/buildtasks/helpers/file_rule.rb