Class: Lutaml::Xml::DataModel::XmlComment
- Inherits:
-
Object
- Object
- Lutaml::Xml::DataModel::XmlComment
- Defined in:
- lib/lutaml/xml/data_model.rb
Overview
Represents an XML comment in the data model tree. Stored as a child of XmlElement alongside String (text) and XmlElement children.
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
Instance Method Summary collapse
-
#initialize(content) ⇒ XmlComment
constructor
A new instance of XmlComment.
- #to_s ⇒ Object
Constructor Details
#initialize(content) ⇒ XmlComment
Returns a new instance of XmlComment.
261 262 263 |
# File 'lib/lutaml/xml/data_model.rb', line 261 def initialize(content) @content = content end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
259 260 261 |
# File 'lib/lutaml/xml/data_model.rb', line 259 def content @content end |
Instance Method Details
#to_s ⇒ Object
265 266 267 |
# File 'lib/lutaml/xml/data_model.rb', line 265 def to_s "<!--#{content}-->" end |