Top Level Namespace
Defined Under Namespace
Modules: LucidMachines
Classes: AASMExport, Block, Chart, ChartLoader, Element, GraphVizExport, Link, Page
Constant Summary
collapse
- BlockTypes =
["Text", "Process", "Terminator", "Decision", "Attribute"]
- Containers =
["Swim Lane"]
- StructTypes =
["Page", "Line"] + Containers
- Links =
["Line"]
- ValidArrows =
["Arrow"]
- InvalidArrow =
["None"]
- ArrowTypes =
ValidArrows + InvalidArrow
Instance Method Summary
collapse
Instance Method Details
#export(chart, sheet, class_name = "MyClass") ⇒ Object
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/lucidMachines/helper.rb', line 3
def export(chart, sheet, class_name = "MyClass")
p_ex2 = chart.page sheet
page = chart.subchart_for_page p_ex2
GraphVizExport.new(page).build_graph("export/chart-#{sheet}.png")
page_aasm_export = AASMExport.new(page)
b = <<-CODE_BEGIN
class #{class_name}
CODE_BEGIN
e = <<-CODE_END
end
CODE_END
open("export/#{sheet}_generated.rb", 'w') do |f|
f << b
f << page_aasm_export.export
f << page_aasm_export.generate_methods_placeholder
f << e
end
end
|
#export_all(chart) ⇒ Object
30
31
32
33
34
|
# File 'lib/lucidMachines/helper.rb', line 30
def export_all(chart)
chart.pages.each_value do |p|
export(chart, p.name)
end
end
|
#is_page?(d) ⇒ Boolean
10
|
# File 'lib/lucidMachines/loader.rb', line 10
def is_page?(d); d["Page ID"].nil? and d["Name"] == "Page"; end
|