class PathSpec::RegexSpec
Simple regex-based spec
Public Class Methods
new(pattern)
click to toggle source
Calls superclass method
# File lib/pathspec/regexspec.rb, line 6 def initialize(pattern) @pattern = pattern.dup @regex = Regexp.compile pattern super end
Public Instance Methods
inclusive?()
click to toggle source
# File lib/pathspec/regexspec.rb, line 13 def inclusive? true end
match(path)
click to toggle source
# File lib/pathspec/regexspec.rb, line 17 def match(path) @regex.match(path) if @regex end