Class: RSpec::Core::InclusionRules Private
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
FilterRules
|
|
Instance Chain:
self,
FilterRules
|
|
Inherits: |
RSpec::Core::FilterRules
|
Defined in: | rspec-core/lib/rspec/core/filter_manager.rb |
Constant Summary
FilterRules
- Inherited
Class Method Summary
FilterRules
- Inherited
Instance Attribute Summary
- #standalone? ⇒ Boolean readonly Internal use only
FilterRules
- Inherited
Instance Method Summary
- #add(*args) Internal use only
- #add_with_low_priority(*args) Internal use only
- #include_example?(example) ⇒ Boolean Internal use only
- #split_file_scoped_rules Internal use only
- #apply_standalone_filter(updated) private Internal use only
- #is_standalone_filter?(rules) ⇒ Boolean private Internal use only
- #replace_filters(new_rules) private Internal use only
FilterRules
- Inherited
Instance Attribute Details
#standalone? ⇒ Boolean
(readonly)
# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 199
def standalone? is_standalone_filter?(@rules) end
Instance Method Details
#add(*args)
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 187
def add(*args) apply_standalone_filter(*args) || super end
#add_with_low_priority(*args)
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 191
def add_with_low_priority(*args) apply_standalone_filter(*args) || super end
#apply_standalone_filter(updated) (private)
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 213
def apply_standalone_filter(updated) return true if standalone? return nil unless is_standalone_filter?(updated) replace_filters(updated) true end
#include_example?(example) ⇒ Boolean
# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 195
def include_example?(example) @rules.empty? || super end
#is_standalone_filter?(rules) ⇒ Boolean
(private)
# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 226
def is_standalone_filter?(rules) rules.key?(:full_description) end
#replace_filters(new_rules) (private)
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 221
def replace_filters(new_rules) @rules.replace(new_rules) opposite.clear end
#split_file_scoped_rules
[ GitHub ]# File 'rspec-core/lib/rspec/core/filter_manager.rb', line 203
def split_file_scoped_rules rules_dup = @rules.dup locations = rules_dup.delete(:locations) { Hash.new([]) } ids = rules_dup.delete(:ids) { Hash.new([]) } return locations, ids, self.class.new(rules_dup) end