Class: TableBeet::World
- Inherits:
-
Object
- Object
- TableBeet::World
- Defined in:
- lib/table_beet/world.rb
Defined Under Namespace
Classes: Space
Class Method Summary collapse
-
.scopes ⇒ Hash
The hash that { scope name => Array of ::TableBeet:Step }.
Class Method Details
.scopes ⇒ Hash
Returns The hash that { scope name => Array of ::TableBeet:Step }.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/table_beet/world.rb', line 8 def self.scopes scopes = Hash.new {|hash, key| hash[key] = []} RSpec.configuration.include_or_extend_modules.each do |_, mod, | space = Space.new(mod) step_names = space.define_steps next if step_names.empty? scope_name = .keys.first step_names.each do |name| scopes[scope_name] << Step.new(space.method(name)) end end scopes end |