Class: Coradoc::CoreModel::ElementAttribute
- Inherits:
-
Base
- Object
- Lutaml::Model::Serializable
- Base
- Coradoc::CoreModel::ElementAttribute
- Defined in:
- lib/coradoc/core_model/element_attribute.rb
Overview
Represents a single attribute (key-value pair) on an element
Instance Attribute Summary
Attributes inherited from Base
#element_attributes, #id, #metadata_entries, #title
Instance Method Summary collapse
-
#to_h ⇒ Hash
Convert to hash representation.
-
#to_s ⇒ String
Convert to string representation (e.g., for serialization).
Methods inherited from Base
#accept, #attr, #metadata, #semantically_equivalent?, #set_attr, #set_metadata
Instance Method Details
#to_h ⇒ Hash
Convert to hash representation
15 16 17 |
# File 'lib/coradoc/core_model/element_attribute.rb', line 15 def to_h { name => value } end |
#to_s ⇒ String
Convert to string representation (e.g., for serialization)
21 22 23 |
# File 'lib/coradoc/core_model/element_attribute.rb', line 21 def to_s %("#{name}="#{value}"") end |