Sha256: 656419644c1a12612ad8b06a418e660aa65709b16796451d417766e54df54554
Contents?: true
Size: 881 Bytes
Versions: 7
Compression:
Stored size: 881 Bytes
Contents
# frozen_string_literal: true # Attach configuration to the DrawIO DSL module # :nocov: module DrawioDsl # Used to attach configuration to KConfig module module ConfigurationShapes ShapeDefaults = Struct.new(:type, :category, :x, :y, :w, :h, :style_modifiers, keyword_init: true) Shapes = Struct.new( :shape, {{#each shapes}} :{{snake ./type}}, {{/each}} keyword_init: true ) def add_shapes @shapes = Shapes.new( shape: ShapeDefaults.new(type: :shape, category: :element, x: 0, y: 0, w: 20, h: 20, style_modifiers: ''), {{#each shapes}} {{snake ./type}}: ShapeDefaults.new(type: :{{snake ./type}}, x: {{./x}}, category: :{{./category}}, y: {{./y}}, w: {{./w}}, h: {{./h}}, style_modifiers: '{{{./style_modifiers}}}'){{#if @last}}{{^}},{{/if}} {{/each}} ) end end end # :nocov:
Version data entries
7 entries across 7 versions & 1 rubygems