Class: Leftovers::Matchers::Path

Inherits:
Object
  • Object
show all
Includes:
ComparableInstance
Defined in:
lib/leftovers/matchers/path.rb

Instance Method Summary collapse

Methods included from ComparableInstance

#eql?, #hash

Constructor Details

#initialize(fast_ignore) ⇒ Path

Returns a new instance of Path.



8
9
10
11
12
# File 'lib/leftovers/matchers/path.rb', line 8

def initialize(fast_ignore)
  @fast_ignore = fast_ignore

  freeze
end

Instance Method Details

#===(path) ⇒ Object



14
15
16
# File 'lib/leftovers/matchers/path.rb', line 14

def ===(path)
  @fast_ignore.allowed?(path, exists: true, directory: false)
end