Class: Lutaml::Xsd::Spa::Svg::Config::ShadowEffect

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

Overview

Shadow effect value object

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#blurObject (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_xObject (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_yObject (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

#opacityObject (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

Returns:

  • (Boolean)


57
58
59
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 57

def enabled?
  @enabled
end