Class: SyntaxTree::Mermaid::Node
- Inherits:
-
Object
- Object
- SyntaxTree::Mermaid::Node
- Defined in:
- lib/syntax_tree/mermaid.rb
Overview
This class represents a node in a flowchart. Unlike the Link class, it can be used directly. It is the return value of the #node method, and is meant to be passed around to #link methods to create links between nodes.
Constant Summary collapse
- SHAPES =
%i[circle rectangle rounded stadium].freeze
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#shape ⇒ Object
readonly
Returns the value of attribute shape.
Instance Method Summary collapse
-
#initialize(id, label, shape) ⇒ Node
constructor
A new instance of Node.
- #render ⇒ Object
Constructor Details
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
124 125 126 |
# File 'lib/syntax_tree/mermaid.rb', line 124 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
124 125 126 |
# File 'lib/syntax_tree/mermaid.rb', line 124 def label @label end |
#shape ⇒ Object (readonly)
Returns the value of attribute shape.
124 125 126 |
# File 'lib/syntax_tree/mermaid.rb', line 124 def shape @shape end |