method
execute_in_class_hierarchy
1.1.4 -
Show latest stable
-
0 notes -
Class: Spec::Example::ExampleGroupMethods
- 1.1.4 (0)
- 1.1.12
- 1.2.0
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
execute_in_class_hierarchy(superclass_last=false)
private
Hide source
# File lib/spec/example/example_group_methods.rb, line 350 def execute_in_class_hierarchy(superclass_last=false) classes = [] current_class = self while is_example_group?(current_class) superclass_last ? classes << current_class : classes.unshift(current_class) current_class = current_class.superclass end superclass_last ? classes << ExampleMethods : classes.unshift(ExampleMethods) classes.each do |example_group| yield example_group end end