Class: Spex::Execution::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/spex/execution.rb

Instance Method Summary collapse

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, options|
    @execution << Check[name].new(target, options)
  end
end