Class: TTK::Strategies::Composite
- Inherits:
-
Strategy
show all
- Includes:
- Abstract
- Defined in:
- lib/ttk/strategies/Composite.rb
Defined Under Namespace
Modules: Ordered
Instance Attribute Summary
Attributes inherited from Strategy
#status, #symtbl
Instance Method Summary
collapse
Methods inherited from Strategy
#abort, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize_flow_factory, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #strategy, #strategy=, #symbols=, #testify, #timeout=, #to_s, #wclass=
Constructor Details
#initialize(*a, &b) ⇒ Composite
15
16
17
18
19
|
# File 'lib/ttk/strategies/Composite.rb', line 15
def initialize ( *a, &b )
@contents = []
@status_list = []
super
end
|
Instance Method Details
#<<(anObject) ⇒ Object
38
39
40
41
|
# File 'lib/ttk/strategies/Composite.rb', line 38
def << ( anObject )
create(anObject)
self
end
|
#create(anObject, &block) ⇒ Object
28
29
30
31
32
33
34
35
|
# File 'lib/ttk/strategies/Composite.rb', line 28
def create ( anObject, &block )
res = anObject.testify(testify_options) do |aTest|
initialize_test(aTest)
block[aTest] if block_given?
end
@contents << res
res
end
|
#initialize_test(aTest) ⇒ Object
22
23
24
25
|
# File 'lib/ttk/strategies/Composite.rb', line 22
def initialize_test ( aTest )
aTest.wclass = @wclass
aTest.symtbl = new_symtbl
end
|
#new_symtbl ⇒ Object
44
45
46
|
# File 'lib/ttk/strategies/Composite.rb', line 44
def new_symtbl
@symtbl.class.new(@symtbl)
end
|