Class: LiquidDiagrams::Renderers::ErdRenderer
- Inherits:
-
BasicRenderer
- Object
- BasicRenderer
- LiquidDiagrams::Renderers::ErdRenderer
- Defined in:
- lib/liquid_diagrams/renderers/erd_renderer.rb
Constant Summary collapse
- FLAGS =
%w[ dot-entity ].freeze
- OPTIONS =
%w[ config edge ].freeze
- OPTIONS_SEPARATOR =
'='
- XML_REGEX =
/^<\?xml(([^>]|\n)*>\n?){2}/.freeze
Constants inherited from BasicRenderer
BasicRenderer::FLAGS_PREFIX, BasicRenderer::OPTIONS_PREFIX
Instance Method Summary collapse
Methods inherited from BasicRenderer
#arguments, #build_command, #initialize, render
Methods included from LiquidDiagrams::Rendering
render_with_command, render_with_stdin_stdout, render_with_tempfile
Constructor Details
This class inherits a constructor from LiquidDiagrams::BasicRenderer
Instance Method Details
#executable ⇒ Object
23 24 25 |
# File 'lib/liquid_diagrams/renderers/erd_renderer.rb', line 23 def executable 'erd --fmt=svg' end |
#render ⇒ Object
19 20 21 |
# File 'lib/liquid_diagrams/renderers/erd_renderer.rb', line 19 def render Rendering.render_with_stdin_stdout(build_command, @content).sub(XML_REGEX, '') end |