Class: Uniword::Properties::ColorValue
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Uniword::Properties::ColorValue
- Defined in:
- lib/uniword/properties/color_value.rb
Overview
Color value element
Represents <w:color w:val=“…” w:themeColor=“…” w:themeShade=“…”/> where value is RGB hex (e.g., “FF0000”) and themeColor references theme (e.g., “background1”) themeShade is a hex tint value (e.g., “BF”)
Instance Method Summary collapse
-
#==(other) ⇒ Object
(also: #eql?)
Compare with another ColorValue or a string.
-
#hash ⇒ Object
For hash key compatibility.
-
#to_s ⇒ Object
For string interpolation.
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
Compare with another ColorValue or a string
34 35 36 37 38 39 40 41 42 |
# File 'lib/uniword/properties/color_value.rb', line 34 def ==(other) if other.is_a?(ColorValue) value == other.value elsif other.is_a?(String) value == other else super end end |
#hash ⇒ Object
For hash key compatibility
52 53 54 |
# File 'lib/uniword/properties/color_value.rb', line 52 def hash value.hash end |
#to_s ⇒ Object
For string interpolation
47 48 49 |
# File 'lib/uniword/properties/color_value.rb', line 47 def to_s value.to_s end |