Class: SULStyles::Colors::ColorData

Inherits:
Object
  • Object
show all
Defined in:
lib/sul_styles/colors.rb

Overview

Utility class to model a css variable and its value

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#valueObject (readonly)

Returns the value of attribute value.



69
70
71
# File 'lib/sul_styles/colors.rb', line 69

def value
  @value
end

#variableObject (readonly)

Returns the value of attribute variable.



69
70
71
# File 'lib/sul_styles/colors.rb', line 69

def variable
  @variable
end