Class: Lutaml::Xsd::Spa::Svg::Config::IndicatorColors
- Inherits:
-
Object
- Object
- Lutaml::Xsd::Spa::Svg::Config::IndicatorColors
- Defined in:
- lib/lutaml/xsd/spa/svg/config/color_scheme.rb
Overview
Indicator color value object
Instance Attribute Summary collapse
-
#abstract ⇒ Object
readonly
Returns the value of attribute abstract.
-
#optional ⇒ Object
readonly
Returns the value of attribute optional.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
Instance Method Summary collapse
- #color_for(type) ⇒ Object
-
#initialize(colors_hash) ⇒ IndicatorColors
constructor
A new instance of IndicatorColors.
Constructor Details
#initialize(colors_hash) ⇒ IndicatorColors
Returns a new instance of IndicatorColors.
66 67 68 69 70 |
# File 'lib/lutaml/xsd/spa/svg/config/color_scheme.rb', line 66 def initialize(colors_hash) @required = colors_hash["required"] @optional = colors_hash["optional"] @abstract = colors_hash["abstract"] end |
Instance Attribute Details
#abstract ⇒ Object (readonly)
Returns the value of attribute abstract.
64 65 66 |
# File 'lib/lutaml/xsd/spa/svg/config/color_scheme.rb', line 64 def abstract @abstract end |
#optional ⇒ Object (readonly)
Returns the value of attribute optional.
64 65 66 |
# File 'lib/lutaml/xsd/spa/svg/config/color_scheme.rb', line 64 def optional @optional end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
64 65 66 |
# File 'lib/lutaml/xsd/spa/svg/config/color_scheme.rb', line 64 def required @required end |
Instance Method Details
#color_for(type) ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/lutaml/xsd/spa/svg/config/color_scheme.rb', line 72 def color_for(type) case type.to_sym when :required then @required when :optional then @optional when :abstract then @abstract end end |