Class: Architect::Note
Overview
A note in a class diagram
Instance Attribute Summary collapse
-
#graphnode ⇒ Object
Returns the value of attribute graphnode.
Attributes inherited from Node
Instance Method Summary collapse
- #graph(g) ⇒ Object
-
#initialize(markup) ⇒ Note
constructor
A new instance of Note.
Methods inherited from Node
Constructor Details
#initialize(markup) ⇒ Note
Returns a new instance of Note.
7 8 9 10 11 |
# File 'lib/architect/note.rb', line 7 def initialize(markup) matches = /note:(.+)/i.match(markup) @markup = matches[1].strip @style = {shape: "note", style: "filled", fillcolor: "lightgrey"} end |
Instance Attribute Details
#graphnode ⇒ Object
Returns the value of attribute graphnode.
5 6 7 |
# File 'lib/architect/note.rb', line 5 def graphnode @graphnode end |
Instance Method Details
#graph(g) ⇒ Object
13 14 15 |
# File 'lib/architect/note.rb', line 13 def graph(g) @graphnode = g.add_nodes(@markup, @style) end |