Sha256: c2a6ee82a1f1439ae92479674df2e1af2ac10cff3463c7c9da1c2562b37844b1
Contents?: true
Size: 308 Bytes
Versions: 24
Compression:
Stored size: 308 Bytes
Contents
require 'forwardable' module Dragonfly class Whitelist extend Forwardable def_delegators :patterns, :push def initialize(patterns=[]) @patterns = patterns end attr_reader :patterns def include?(string) patterns.any?{|pattern| pattern === string } end end end
Version data entries
24 entries across 24 versions & 1 rubygems