Class: Lutaml::Xml::DataModel::XmlComment

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ XmlComment

Returns a new instance of XmlComment.



269
270
271
# File 'lib/lutaml/xml/data_model.rb', line 269

def initialize(content)
  @content = content
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



267
268
269
# File 'lib/lutaml/xml/data_model.rb', line 267

def content
  @content
end

Instance Method Details

#to_sObject



273
274
275
# File 'lib/lutaml/xml/data_model.rb', line 273

def to_s
  "<!--#{content}-->"
end