Class: Lutaml::Xsd::Spa::Svg::Config::IndicatorRule

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/xsd/spa/svg/config/indicator_rules.rb

Overview

Individual indicator rule value object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rule_hash) ⇒ IndicatorRule

Returns a new instance of IndicatorRule.



35
36
37
38
39
40
41
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 35

def initialize(rule_hash)
  @text = rule_hash["text"] || ""
  @position = rule_hash["position"] || "top_right"
  @style = rule_hash["style"] || "normal"
  @offset_x = rule_hash["offset_x"] || -5
  @offset_y = rule_hash["offset_y"] || 12
end

Instance Attribute Details

#offset_xObject (readonly)

Returns the value of attribute offset_x.



33
34
35
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 33

def offset_x
  @offset_x
end

#offset_yObject (readonly)

Returns the value of attribute offset_y.



33
34
35
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 33

def offset_y
  @offset_y
end

#positionObject (readonly)

Returns the value of attribute position.



33
34
35
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 33

def position
  @position
end

#styleObject (readonly)

Returns the value of attribute style.



33
34
35
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 33

def style
  @style
end

#textObject (readonly)

Returns the value of attribute text.



33
34
35
# File 'lib/lutaml/xsd/spa/svg/config/indicator_rules.rb', line 33

def text
  @text
end