Class: DrawioDsl::Schema::CommonStyle
- Inherits:
-
Object
- Object
- DrawioDsl::Schema::CommonStyle
- Defined in:
- lib/drawio_dsl/schema/common_style.rb
Overview
Common Style is the reused on Diagram, Page and Shape
When styles are not provided at each level, then they will inherit from the parent common style.
Shapes will use the common style of their page
Instance Attribute Summary collapse
-
#glass ⇒ Object
Returns the value of attribute glass.
-
#html ⇒ Object
Returns the value of attribute html.
-
#rounded ⇒ Object
Returns the value of attribute rounded.
-
#shadow ⇒ Object
Returns the value of attribute shadow.
-
#sketch ⇒ Object
Returns the value of attribute sketch.
-
#white_space ⇒ Object
Returns the value of attribute white_space.
Instance Method Summary collapse
-
#initialize(**args, &block) ⇒ CommonStyle
constructor
A new instance of CommonStyle.
- #to_h ⇒ Object
Constructor Details
#initialize(**args, &block) ⇒ CommonStyle
Returns a new instance of CommonStyle.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/drawio_dsl/schema/common_style.rb', line 19 def initialize(**args, &block) @white_space = args[:white_space] @html = args[:html] @rounded = args[:rounded] @shadow = args[:shadow] @sketch = args[:sketch] @glass = args[:glass] instance_eval(&block) if block_given? end |
Instance Attribute Details
#glass ⇒ Object
Returns the value of attribute glass.
16 17 18 |
# File 'lib/drawio_dsl/schema/common_style.rb', line 16 def glass @glass end |
#html ⇒ Object
Returns the value of attribute html.
13 14 15 |
# File 'lib/drawio_dsl/schema/common_style.rb', line 13 def html @html end |
#rounded ⇒ Object
Returns the value of attribute rounded.
14 15 16 |
# File 'lib/drawio_dsl/schema/common_style.rb', line 14 def rounded @rounded end |
#shadow ⇒ Object
Returns the value of attribute shadow.
15 16 17 |
# File 'lib/drawio_dsl/schema/common_style.rb', line 15 def shadow @shadow end |
#sketch ⇒ Object
Returns the value of attribute sketch.
17 18 19 |
# File 'lib/drawio_dsl/schema/common_style.rb', line 17 def sketch @sketch end |
#white_space ⇒ Object
Returns the value of attribute white_space.
12 13 14 |
# File 'lib/drawio_dsl/schema/common_style.rb', line 12 def white_space @white_space end |
Instance Method Details
#to_h ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/drawio_dsl/schema/common_style.rb', line 30 def to_h { white_space: white_space, html: html, rounded: rounded, shadow: shadow, sketch: sketch, glass: glass } end |