Class: TableBeet::World
- Inherits:
-
Object
- Object
- TableBeet::World
- Defined in:
- lib/table_beet/world.rb
Defined Under Namespace
Classes: Space
Class Method Summary collapse
- .include_modules ⇒ Object
-
.scopes ⇒ Hash
The hash that { scope name => Array of ::TableBeet:Step }.
Class Method Details
.include_modules ⇒ Object
28 29 30 |
# File 'lib/table_beet/world.rb', line 28 def self.include_modules RSpec.configuration.instance_variable_get(:@include_modules).items_and_filters end |
.scopes ⇒ Hash
Returns The hash that { scope name => Array of ::TableBeet:Step }.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/table_beet/world.rb', line 10 def self.scopes scopes = Hash.new { |hash, key| hash[key] = [] } include_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 |