Sha256: aae9362a34f47b1565d2f96e2e3a6c59f8e3f5fc836a2552d46659476eb50b94
Contents?: true
Size: 621 Bytes
Versions: 9
Compression:
Stored size: 621 Bytes
Contents
u = up.util class up.UrlSet constructor: (@urls, options = {}) -> @normalizeUrl = options.normalizeUrl || u.normalizeUrl @urls = u.map(@urls, @normalizeUrl) @urls = u.compact(@urls) matches: (testUrl) => if testUrl.substr(-1) == '*' @doesMatchPrefix(testUrl.slice(0, -1)) else @doesMatchFully(testUrl) doesMatchFully: (testUrl) => u.contains(@urls, testUrl) doesMatchPrefix: (prefix) => u.detect @urls, (url) -> url.indexOf(prefix) == 0 matchesAny: (testUrls) => u.detect(testUrls, @matches) isEqual: (otherSet) => u.isEqual(@urls, otherSet?.urls)
Version data entries
9 entries across 9 versions & 1 rubygems