Class: Origen::Tester::Doc::Generator::Flow
Constant Summary
collapse
- OUTPUT_POSTFIX =
'flow'
- OUTPUT_EXTENSION =
'yaml'
Generator::FlowControlAPI::FLOW_METHODS, Generator::FlowControlAPI::RELATION_METHODS
Instance Method Summary
collapse
#apply_current_context!, #apply_relationships, #at_run_start, #conditionally_deactivated?, #confirm_valid_context, #context_changed?, #current_context, #extract_flow_control_options!, #extract_relation_options!, #finalize, #find_by_id, #generate_unique_label, #identity_map, #if_all_failed, #if_all_passed, #if_any_failed, #if_any_passed, #if_enable, #if_failed, #if_job, #if_passed, #if_ran, #record_id, #replace_context_with_current, #save_context, #summarize_context, #track_relationships, #unless_enable, #unless_job, #unless_ran
Methods included from Generator
#close, #collection, #collection=, #compiler, #current_dir, #dont_diff=, execute_source, #file_extension, #file_pipeline, #filename, #filename=, #finalize, #identity_map, #import, #inhibit_output, #on_close, #output_file, #output_inhibited?, #reference_file, #set_flow_description, #stats, #to_be_written?, #write_from_template, #write_to_file
Instance Method Details
#add(type, options = {}) ⇒ Object
#render(file, options = {}) ⇒ Object
54
55
56
57
|
# File 'lib/origen/tester/doc/generator/flow.rb', line 54
def render(file, options = {})
options[:file] = file
add(:render, options)
end
|
#set_device(options = {}) ⇒ Object
46
47
48
|
# File 'lib/origen/tester/doc/generator/flow.rb', line 46
def set_device(options = {})
add(:set_device, options)
end
|
#skip(identifier = nil, options = {}) ⇒ Object
59
60
61
62
63
64
65
66
|
# File 'lib/origen/tester/doc/generator/flow.rb', line 59
def skip(identifier = nil, options = {})
identifier, options = nil, identifier if identifier.is_a?(Hash)
identifier = generate_unique_label(identifier)
options[:test] = identifier
add(:branch, options)
yield
add(:label, test: identifier)
end
|
#start_section(options = {}) ⇒ Object
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/origen/tester/doc/generator/flow.rb', line 26
def start_section(options = {})
l = FlowLine.new(:section_start, options)
if options[:name]
desc = [options[:name]]
else
desc = []
end
l.description = desc + Origen.interface.
collection << l
end
|
#stop_section(options = {}) ⇒ Object
37
38
39
|
# File 'lib/origen/tester/doc/generator/flow.rb', line 37
def stop_section(options = {})
collection << FlowLine.new(:section_stop, options)
end
|
#test(instance, options = {}) ⇒ Object
41
42
43
44
|
# File 'lib/origen/tester/doc/generator/flow.rb', line 41
def test(instance, options = {})
options = save_context(options)
add(:test, { test: instance }.merge(options))
end
|
#to_yaml(options = {}) ⇒ Object
50
51
52
|
# File 'lib/origen/tester/doc/generator/flow.rb', line 50
def to_yaml(options = {})
collection.map { |l| l.to_yaml(options) }
end
|