Class: Lutaml::Xsd::Spa::Svg::Config::GradientEffect

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

Overview

Gradient effect value object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gradient_hash) ⇒ GradientEffect

Returns a new instance of GradientEffect.



66
67
68
69
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 66

def initialize(gradient_hash)
  @enabled = gradient_hash["enabled"].nil? || gradient_hash["enabled"]
  @direction = gradient_hash["direction"] || "vertical"
end

Instance Attribute Details

#directionObject (readonly)

Returns the value of attribute direction.



64
65
66
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 64

def direction
  @direction
end

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/lutaml/xsd/spa/svg/config/effects.rb', line 71

def enabled?
  @enabled
end