Class: DrawioDsl::Schema::DefaultPalette
- Inherits:
-
Object
- Object
- DrawioDsl::Schema::DefaultPalette
- Defined in:
- lib/drawio_dsl/schema/default_palette.rb
Overview
Default Palette contains palette information that can be inherited at each level
Instance Attribute Summary collapse
-
#fill_color ⇒ Object
Returns the value of attribute fill_color.
-
#font_color ⇒ Object
Returns the value of attribute font_color.
-
#gradient ⇒ Object
Returns the value of attribute gradient.
-
#stroke_color ⇒ Object
Returns the value of attribute stroke_color.
Instance Method Summary collapse
-
#initialize(owner, **args, &block) ⇒ DefaultPalette
constructor
A new instance of DefaultPalette.
- #to_h ⇒ Object
Constructor Details
#initialize(owner, **args, &block) ⇒ DefaultPalette
Returns a new instance of DefaultPalette.
12 13 14 15 16 17 18 19 |
# File 'lib/drawio_dsl/schema/default_palette.rb', line 12 def initialize(owner, **args, &block) @fill_color = args[:fill_color] @stroke_color = args[:stroke_color] @font_color = args[:font_color] @gradient = args[:gradient] instance_exec(owner, &block) if block_given? end |
Instance Attribute Details
#fill_color ⇒ Object
Returns the value of attribute fill_color.
7 8 9 |
# File 'lib/drawio_dsl/schema/default_palette.rb', line 7 def fill_color @fill_color end |
#font_color ⇒ Object
Returns the value of attribute font_color.
9 10 11 |
# File 'lib/drawio_dsl/schema/default_palette.rb', line 9 def font_color @font_color end |
#gradient ⇒ Object
Returns the value of attribute gradient.
10 11 12 |
# File 'lib/drawio_dsl/schema/default_palette.rb', line 10 def gradient @gradient end |
#stroke_color ⇒ Object
Returns the value of attribute stroke_color.
8 9 10 |
# File 'lib/drawio_dsl/schema/default_palette.rb', line 8 def stroke_color @stroke_color end |
Instance Method Details
#to_h ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/drawio_dsl/schema/default_palette.rb', line 21 def to_h { fill_color: fill_color, stroke_color: stroke_color, font_color: font_color, gradient: gradient } end |