Class: Lutaml::Xsd::Spa::Svg::Config::ShadowEffect
- Inherits:
-
Object
- Object
- Lutaml::Xsd::Spa::Svg::Config::ShadowEffect
- Defined in:
- lib/lutaml/xsd/spa/svg/config/effects.rb
Overview
Shadow effect value object
Instance Attribute Summary collapse
-
#blur ⇒ Object
readonly
Returns the value of attribute blur.
-
#offset_x ⇒ Object
readonly
Returns the value of attribute offset_x.
-
#offset_y ⇒ Object
readonly
Returns the value of attribute offset_y.
-
#opacity ⇒ Object
readonly
Returns the value of attribute opacity.
Instance Method Summary collapse
- #enabled? ⇒ Boolean
-
#initialize(shadow_hash) ⇒ ShadowEffect
constructor
A new instance of ShadowEffect.
Constructor Details
#initialize(shadow_hash) ⇒ ShadowEffect
Returns a new instance of ShadowEffect.
49 50 51 52 53 54 55 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 49 def initialize(shadow_hash) @enabled = shadow_hash["enabled"].nil? || shadow_hash["enabled"] @blur = shadow_hash["blur"] || 2 @offset_x = shadow_hash["offset_x"] || 2 @offset_y = shadow_hash["offset_y"] || 2 @opacity = shadow_hash["opacity"] || 0.3 end |
Instance Attribute Details
#blur ⇒ Object (readonly)
Returns the value of attribute blur.
47 48 49 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 47 def blur @blur end |
#offset_x ⇒ Object (readonly)
Returns the value of attribute offset_x.
47 48 49 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 47 def offset_x @offset_x end |
#offset_y ⇒ Object (readonly)
Returns the value of attribute offset_y.
47 48 49 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 47 def offset_y @offset_y end |
#opacity ⇒ Object (readonly)
Returns the value of attribute opacity.
47 48 49 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 47 def opacity @opacity end |
Instance Method Details
#enabled? ⇒ Boolean
57 58 59 |
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 57 def enabled? @enabled end |