Class: RSpec::Core::FilterRules Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
RSpec::Core::InclusionRules
|
|
Inherits: | Object |
Defined in: | rspec-core/lib/rspec/core/filter_manager.rb |
Constant Summary
-
PROC_HEX_NUMBER =
# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 116/0x[0-9a-f]+@?/
-
PROJECT_DIR =
# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 117File. ('.')
Class Method Summary
- .build Internal use only
- .new(rules = {}) ⇒ FilterRules constructor Internal use only
Instance Attribute Summary
- #empty? ⇒ Boolean readonly Internal use only
- #opposite rw Internal use only
- #rules readonly Internal use only
Instance Method Summary
- #[](key) Internal use only
- #add(updated) Internal use only
- #add_with_low_priority(updated) Internal use only
- #clear Internal use only
- #delete(key) Internal use only
- #description Internal use only
- #each_pair(&block) Internal use only
- #fetch(*args, &block) Internal use only
- #include_example?(example) ⇒ Boolean Internal use only
- #use_only(updated) Internal use only
Class Method Details
.build
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 122
def self.build exclusions = ExclusionRules.new inclusions = InclusionRules.new exclusions.opposite = inclusions inclusions.opposite = exclusions [exclusions, inclusions] end
Instance Attribute Details
#empty? ⇒ Boolean
(readonly)
# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 165
def empty? rules.empty? end
#opposite (rw)
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 119
attr_accessor :opposite
#rules (readonly)
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 120
attr_reader :rules
Instance Method Details
#[](key)
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 161
def [](key) @rules[key] end
#add(updated)
[ GitHub ]#add_with_low_priority(updated)
[ GitHub ]#clear
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 149
def clear @rules.clear end
#delete(key)
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 153
def delete(key) @rules.delete(key) end
#description
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 173
def description rules.inspect.gsub(PROC_HEX_NUMBER, '').gsub(PROJECT_DIR, '.').gsub(' (lambda)', '') end
#each_pair(&block)
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 169
def each_pair(&block) @rules.each_pair(&block) end
#fetch(*args, &block)
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 157
def fetch(*args, &block) @rules.fetch(*args, &block) end
#include_example?(example) ⇒ Boolean
# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 177
def include_example?(example) MetadataFilter.apply?(:any?, @rules, example. ) end