Class: Postsvg::Svg::OpenElement

Inherits:
Element
  • Object
show all
Defined in:
lib/postsvg/svg/element.rb

Overview

Fallback for unknown SVG element types. Carries the element name so handlers can skip or warn; carries children so traversal still descends into known subtrees.

Constant Summary collapse

ELEMENT_NAME =
"open"

Constants inherited from Element

Element::REGISTRY

Instance Attribute Summary collapse

Attributes inherited from Element

#attributes, #children, #clip_path_id, #fill, #stroke, #stroke_paint, #transform

Instance Method Summary collapse

Methods inherited from Element

#default_fill, #element_name, from_node, register, registry

Constructor Details

#initialize(name:, **rest) ⇒ OpenElement

Returns a new instance of OpenElement.



78
79
80
81
# File 'lib/postsvg/svg/element.rb', line 78

def initialize(name:, **rest)
  super(**rest)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



76
77
78
# File 'lib/postsvg/svg/element.rb', line 76

def name
  @name
end