Class: Archimate::Svg::ViewNode
- Inherits:
-
Object
- Object
- Archimate::Svg::ViewNode
- Defined in:
- lib/archimate/svg/view_node.rb
Instance Attribute Summary collapse
-
#view_node ⇒ Object
readonly
Returns the value of attribute view_node.
Instance Method Summary collapse
-
#initialize(view_node) ⇒ ViewNode
constructor
A new instance of ViewNode.
-
#render_elements(svg) ⇒ Object
The info needed to render is contained in the view node with the exception of any offset needed.
Constructor Details
#initialize(view_node) ⇒ ViewNode
Returns a new instance of ViewNode.
8 9 10 |
# File 'lib/archimate/svg/view_node.rb', line 8 def initialize(view_node) @view_node = view_node end |
Instance Attribute Details
#view_node ⇒ Object (readonly)
Returns the value of attribute view_node.
6 7 8 |
# File 'lib/archimate/svg/view_node.rb', line 6 def view_node @view_node end |
Instance Method Details
#render_elements(svg) ⇒ Object
The info needed to render is contained in the view node with the exception of any offset needed. So this will need to be included in the recursive drawing of children
14 15 16 17 18 19 |
# File 'lib/archimate/svg/view_node.rb', line 14 def render_elements(svg) Nokogiri::XML::Builder.with(svg) do |xml| EntityFactory.make_entity(view_node, nil).to_svg(xml) end svg end |