class RSpec::Core::InclusionRules
@private
Public Instance Methods
add(*args)
click to toggle source
Calls superclass method
RSpec::Core::FilterRules#add
# File lib/rspec/core/filter_manager.rb, line 169 def add(*args) apply_standalone_filter(*args) || super end
add_with_low_priority(*args)
click to toggle source
Calls superclass method
RSpec::Core::FilterRules#add_with_low_priority
# File lib/rspec/core/filter_manager.rb, line 173 def add_with_low_priority(*args) apply_standalone_filter(*args) || super end
include_example?(example)
click to toggle source
Calls superclass method
RSpec::Core::FilterRules#include_example?
# File lib/rspec/core/filter_manager.rb, line 188 def include_example?(example) @rules.empty? || super end
partition_locations()
click to toggle source
# File lib/rspec/core/filter_manager.rb, line 181 def partition_locations locations = @rules.fetch(:locations) { Hash.new([]) } other_inclusions = self.class.new(@rules.dup.tap { |r| r.delete(:locations) }) return locations, other_inclusions end
standalone?()
click to toggle source
# File lib/rspec/core/filter_manager.rb, line 192 def standalone? is_standalone_filter?(@rules) end
use(*args)
click to toggle source
Calls superclass method
# File lib/rspec/core/filter_manager.rb, line 177 def use(*args) apply_standalone_filter(*args) || super end
Private Instance Methods
apply_standalone_filter(updated)
click to toggle source
# File lib/rspec/core/filter_manager.rb, line 198 def apply_standalone_filter(updated) return true if standalone? return nil unless is_standalone_filter?(updated) replace_filters(updated) true end
is_standalone_filter?(rules)
click to toggle source
# File lib/rspec/core/filter_manager.rb, line 211 def is_standalone_filter?(rules) rules.key?(:full_description) end
replace_filters(new_rules)
click to toggle source
# File lib/rspec/core/filter_manager.rb, line 206 def replace_filters(new_rules) @rules.replace(new_rules) opposite.clear end