Class: Specifier::Context
- Inherits:
-
Object
- Object
- Specifier::Context
- Defined in:
- lib/specifier/context.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
- #describe(scope, &block) ⇒ Object
-
#initialize(scope, &block) ⇒ Context
constructor
A new instance of Context.
- #it(descriptor, &block) ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(scope, &block) ⇒ Context
Returns a new instance of Context.
7 8 9 10 11 |
# File 'lib/specifier/context.rb', line 7 def initialize(scope, &block) @_scope = scope @_block = block @_examples = Set.new end |
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
5 6 7 |
# File 'lib/specifier/context.rb', line 5 def parent @parent end |
Instance Method Details
#describe(scope, &block) ⇒ Object
13 14 15 16 17 |
# File 'lib/specifier/context.rb', line 13 def describe(scope, &block) context = Context.new(scope, &block) context.parent = self context.run end |