Class: RSpec::Raml::ExclusionFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/raml/exclusion_filter.rb

Constant Summary collapse

ANYTHING =
RSpec::Mocks::ArgumentMatchers::AnyArgMatcher::INSTANCE

Instance Method Summary collapse

Constructor Details

#initialize(excludes) ⇒ ExclusionFilter

Returns a new instance of ExclusionFilter.



6
7
8
# File 'lib/rspec/raml/exclusion_filter.rb', line 6

def initialize(excludes)
  @excludes = excludes
end

Instance Method Details

#filter(object) ⇒ Object



10
11
12
13
14
# File 'lib/rspec/raml/exclusion_filter.rb', line 10

def filter(object)
  @excludes.reduce object do |acc, exclude|
    replace(acc, exclude)
  end
end