Top Level Namespace

Defined Under Namespace

Modules: LucidMachines Classes: Block, Chart, ChartLoader, Element, GraphVizExport, Link, Page

Constant Summary collapse

BlockTypes =
["Text", "Process", "Terminator", "Decision", "Attribute"]
Containers =
["Swim Lane"]
StructTypes =
["Page", "Line"] + Containers
["Line"]
ValidArrows =
["Arrow"]
InvalidArrow =
["None"]
ArrowTypes =
ValidArrows + InvalidArrow

Instance Method Summary collapse

Instance Method Details

#export(chart, page_name) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/lucidMachines/helper.rb', line 7

def export(chart, page_name)
  p_ex2 = chart.page page_name
  page = chart.subchart_for_page p_ex2

  # export  GraphViz 1
  GraphVizExport.new(page).build_graph("export/chart-#{page_name}.png")

  # export AASM
  page_aasm_export = AASMExport.new(page)

  # export to a file
  open("export/#{page_name}_generated.rb", 'w') do |f|
    f << page_aasm_export.export
    f << page_aasm_export.generate_methods_placeholder
  end
end

#export_all(chart) ⇒ Object



1
2
3
4
5
# File 'lib/lucidMachines/helper.rb', line 1

def export_all(chart)
  chart.pages.each_value do |p|
    export(chart, p.name)
  end
end

#is_page?(d) ⇒ Boolean

Returns:

  • (Boolean)


10
# File 'lib/lucidMachines/loader.rb', line 10

def is_page?(d); d["Page ID"].nil? and d["Name"] == "Page"; end