Class: Speck
- Inherits:
-
Object
- Object
- Speck
- Defined in:
- lib/speck.rb,
lib/speck/check.rb,
lib/speck/core_ext/check_mixins.rb
Overview
All library files are required at the bottom, because in this unique case we need ‘Speck` defined before we can use it to `Speck` anything.
Defined Under Namespace
Modules: Mixins Classes: Check, Exception
Constant Summary collapse
- Version =
0
Class Attribute Summary collapse
-
.specks ⇒ Object
All defined Specks.
-
.stack ⇒ Object
The current stack of nested ‘Speck`s.
Instance Attribute Summary collapse
-
#checks ⇒ Object
The checks involved in the current ‘Speck`.
-
#children ⇒ Object
Child ‘Speck`s.
-
#parent ⇒ Object
Parent ‘Speck`.
-
#speck ⇒ Object
The block to be executed.
Class Method Summary collapse
-
.current ⇒ Object
Returns the currently active ‘Speck`.
Instance Method Summary collapse
-
#execute ⇒ Object
Executes the ‘Speck`.
-
#initialize(*targets, &speck) ⇒ Speck
constructor
Creates a new ‘Speck`.
Constructor Details
Class Attribute Details
.specks ⇒ Object
All defined Specks.
11 12 13 |
# File 'lib/speck.rb', line 11 def specks @specks end |
.stack ⇒ Object
The current stack of nested ‘Speck`s.
18 19 20 |
# File 'lib/speck.rb', line 18 def stack @stack end |
Instance Attribute Details
#checks ⇒ Object
The checks involved in the current ‘Speck`.
46 47 48 |
# File 'lib/speck.rb', line 46 def checks @checks end |
#children ⇒ Object
Child ‘Speck`s
37 38 39 |
# File 'lib/speck.rb', line 37 def children @children end |
#parent ⇒ Object
Parent ‘Speck`
42 43 44 |
# File 'lib/speck.rb', line 42 def parent @parent end |
#speck ⇒ Object
The block to be executed
33 34 35 |
# File 'lib/speck.rb', line 33 def speck @speck end |
Class Method Details
.current ⇒ Object
Returns the currently active ‘Speck`.
When your ‘Speck`s are being run, there is a `stack` of `Speck` objects, consisting of the current nesting list of `Speck`s being run.
26 27 28 |
# File 'lib/speck.rb', line 26 def current stack.last end |