Class: Spex::Execution

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

Defined Under Namespace

Classes: Builder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(command, &block) ⇒ Execution

Returns a new instance of Execution.



7
8
9
10
# File 'lib/spex/execution.rb', line 7

def initialize(command, &block)
  @command = command
  Builder.new(self, &block)
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



5
6
7
# File 'lib/spex/execution.rb', line 5

def command
  @command
end

Instance Method Details

#<<(check) ⇒ Object



16
17
18
# File 'lib/spex/execution.rb', line 16

def <<(check)
  checks << check
end

#checksObject



12
13
14
# File 'lib/spex/execution.rb', line 12

def checks
  @checks ||= []
end

#each(&block) ⇒ Object



20
21
22
# File 'lib/spex/execution.rb', line 20

def each(&block)
  checks.each(&block)
end