Class: AsciidoctorDiagramLayout::Renderer::RenderOptions
- Inherits:
-
Object
- Object
- AsciidoctorDiagramLayout::Renderer::RenderOptions
- Defined in:
- lib/asciidoctor_diagram_layout/renderer/render_options.rb
Instance Attribute Summary collapse
-
#color_scheme ⇒ Object
readonly
Returns the value of attribute color_scheme.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#name_converter ⇒ Object
readonly
Returns the value of attribute name_converter.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(width: "100%", height: nil, palette: "rainbow", pdf: false, color_scheme: nil, name_converter: nil) ⇒ RenderOptions
constructor
A new instance of RenderOptions.
Constructor Details
#initialize(width: "100%", height: nil, palette: "rainbow", pdf: false, color_scheme: nil, name_converter: nil) ⇒ RenderOptions
Returns a new instance of RenderOptions.
6 7 8 9 10 11 12 |
# File 'lib/asciidoctor_diagram_layout/renderer/render_options.rb', line 6 def initialize(width: "100%", height: nil, palette: "rainbow", pdf: false, color_scheme: nil, name_converter: nil) @width = width @height = height @color_scheme = color_scheme || Scheme::CellColorSchemeFactory.resolve(palette, pdf: pdf) @name_converter = name_converter || method(:escape) end |
Instance Attribute Details
#color_scheme ⇒ Object (readonly)
Returns the value of attribute color_scheme.
4 5 6 |
# File 'lib/asciidoctor_diagram_layout/renderer/render_options.rb', line 4 def color_scheme @color_scheme end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
4 5 6 |
# File 'lib/asciidoctor_diagram_layout/renderer/render_options.rb', line 4 def height @height end |
#name_converter ⇒ Object (readonly)
Returns the value of attribute name_converter.
4 5 6 |
# File 'lib/asciidoctor_diagram_layout/renderer/render_options.rb', line 4 def name_converter @name_converter end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
4 5 6 |
# File 'lib/asciidoctor_diagram_layout/renderer/render_options.rb', line 4 def width @width end |