Sha256: 8d5b58fb248a2172b6cb19e2c1c5b4d33115a0fb791cc7d40e0f750bec934ce2
Contents?: true
Size: 637 Bytes
Versions: 48
Compression:
Stored size: 637 Bytes
Contents
# -*- coding: utf-8 -*- # # @file # @brief # @author ongaeshi # @date 2012/03/02 require 'milkode/common/ignore_setting.rb' module Milkode # # Sample: # c = IgnoreChecker.new # c.add IgnoreSetting.new("/", ["/rdoc", "/test/data", "*.lock"]) # c.add IgnoreSetting.new("/pkg", ["*.gem"]) # c.ignore?('/lib/test.rb') #=> false # c.ignore?('/pkg/hoge.gem') #=> true # class IgnoreChecker attr_reader :settings def initialize @settings = [] end def add(setting) @settings << setting end def ignore?(path) @settings.any?{|s| s.ignore? path } end end end
Version data entries
48 entries across 48 versions & 1 rubygems