Class: Uniword::Properties::StyleReference
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Uniword::Properties::StyleReference
- Defined in:
- lib/uniword/properties/style_reference.rb
Overview
Style reference element for paragraph styles
Represents <w:pStyle w:val=“…”/> where value is the style ID
Instance Method Summary collapse
-
#==(other) ⇒ Object
(also: #eql?)
Compare with another StyleReference or a string.
-
#hash ⇒ Object
For hash key compatibility.
-
#to_s ⇒ Object
For string interpolation and general string-like behavior.
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
Compare with another StyleReference or a string
21 22 23 24 25 26 27 28 29 |
# File 'lib/uniword/properties/style_reference.rb', line 21 def ==(other) if other.is_a?(StyleReference) value == other.value elsif other.is_a?(String) value == other else super end end |
#hash ⇒ Object
For hash key compatibility
39 40 41 |
# File 'lib/uniword/properties/style_reference.rb', line 39 def hash value.hash end |
#to_s ⇒ Object
For string interpolation and general string-like behavior
34 35 36 |
# File 'lib/uniword/properties/style_reference.rb', line 34 def to_s value.to_s end |