Class: Spex::Execution::Builder
- Inherits:
-
Object
- Object
- Spex::Execution::Builder
- Defined in:
- lib/spex/execution.rb
Instance Method Summary collapse
- #check(target, check_names = {}) ⇒ Object
-
#initialize(execution, &block) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(execution, &block) ⇒ Builder
Returns a new instance of Builder.
25 26 27 28 |
# File 'lib/spex/execution.rb', line 25 def initialize(execution, &block) @execution = execution instance_eval(&block) if block_given? end |
Instance Method Details
#check(target, check_names = {}) ⇒ Object
30 31 32 33 34 |
# File 'lib/spex/execution.rb', line 30 def check(target, check_names = {}) check_names.each do |name, | @execution << Check[name].new(target, ) end end |