Class: Lutaml::Xsd::Spa::Svg::Config::IndicatorRules
- Inherits:
-
Object
- Object
- Lutaml::Xsd::Spa::Svg::Config::IndicatorRules
- Defined in:
- lib/lutaml/xsd/spa/svg/config/indicator_rules.rb
Overview
Value object for indicator rendering rules
Instance Method Summary collapse
- #abstract ⇒ Object
-
#initialize(indicators_hash) ⇒ IndicatorRules
constructor
A new instance of IndicatorRules.
- #optional ⇒ Object
- #required ⇒ Object
- #rule_for(indicator_type) ⇒ Object
Constructor Details
#initialize(indicators_hash) ⇒ IndicatorRules
Returns a new instance of IndicatorRules.
10 11 12 |
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 10 def initialize(indicators_hash) @indicators = indicators_hash end |
Instance Method Details
#abstract ⇒ Object
18 19 20 |
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 18 def abstract rule_for("abstract") end |
#optional ⇒ Object
22 23 24 |
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 22 def optional rule_for("optional") end |
#required ⇒ Object
26 27 28 |
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 26 def required rule_for("required") end |
#rule_for(indicator_type) ⇒ Object
14 15 16 |
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 14 def rule_for(indicator_type) IndicatorRule.new(@indicators[indicator_type.to_s] || {}) end |