Class: Crspec::World
- Inherits:
-
Object
- Object
- Crspec::World
- Defined in:
- lib/crspec/dsl.rb
Instance Attribute Summary collapse
-
#example_groups ⇒ Object
readonly
Returns the value of attribute example_groups.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ World
constructor
A new instance of World.
- #register(group) ⇒ Object
Constructor Details
#initialize ⇒ World
Returns a new instance of World.
17 18 19 |
# File 'lib/crspec/dsl.rb', line 17 def initialize @example_groups = [] end |
Instance Attribute Details
#example_groups ⇒ Object (readonly)
Returns the value of attribute example_groups.
15 16 17 |
# File 'lib/crspec/dsl.rb', line 15 def example_groups @example_groups end |
Class Method Details
.instance ⇒ Object
7 8 9 |
# File 'lib/crspec/dsl.rb', line 7 def self.instance @instance ||= new end |
.reset! ⇒ Object
11 12 13 |
# File 'lib/crspec/dsl.rb', line 11 def self.reset! @instance = new end |
Instance Method Details
#register(group) ⇒ Object
21 22 23 |
# File 'lib/crspec/dsl.rb', line 21 def register(group) @example_groups << group end |