Class: SULStyles::Colors::ColorData
- Inherits:
-
Object
- Object
- SULStyles::Colors::ColorData
- Defined in:
- lib/sul_styles/colors.rb
Overview
Utility class to model a css variable and its value
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
-
#variable ⇒ Object
readonly
Returns the value of attribute variable.
Instance Method Summary collapse
-
#initialize(variable:, value:) ⇒ ColorData
constructor
A new instance of ColorData.
Constructor Details
#initialize(variable:, value:) ⇒ ColorData
Returns a new instance of ColorData.
70 71 72 73 |
# File 'lib/sul_styles/colors.rb', line 70 def initialize(variable:, value:) @variable = variable @value = value.gsub(/;$/, '') end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
69 70 71 |
# File 'lib/sul_styles/colors.rb', line 69 def value @value end |
#variable ⇒ Object (readonly)
Returns the value of attribute variable.
69 70 71 |
# File 'lib/sul_styles/colors.rb', line 69 def variable @variable end |