Sha256: 2e4c0e6f8704fb479e4fa720ff29331be385f663bfc27b16aaf6067f98afc363

Contents?: true

Size: 418 Bytes

Versions: 8

Compression:

Stored size: 418 Bytes

Contents

# frozen_string_literal: true

# :nocov:
module DrawioDsl
  # DrawioDsl is a DSL for draw-io diagrams.
  module DomBuilderShapes
    {{#each shapes}}

    def add_{{snake ./type}}(id = nil, **opts, &block)
      opts = { id: id }.merge(opts) if id
      {{snake ./type}} = DrawioDsl::Schema::{{camel ./type}}.new(current_page, **opts, &block)
      add_shape({{snake ./type}})
    end
    {{/each}}
  end
end
# :nocov:

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
drawio_dsl-0.8.8 .builders/.templates/basic/dom_builder_shapes.rb
drawio_dsl-0.8.7 .builders/.templates/basic/dom_builder_shapes.rb
drawio_dsl-0.8.6 .builders/.templates/basic/dom_builder_shapes.rb
drawio_dsl-0.8.5 .builders/.templates/basic/dom_builder_shapes.rb
drawio_dsl-0.8.4 .builders/.templates/basic/dom_builder_shapes.rb
drawio_dsl-0.8.3 .builders/.templates/basic/dom_builder_shapes.rb
drawio_dsl-0.8.2 .builders/.templates/basic/dom_builder_shapes.rb
drawio_dsl-0.8.1 .builders/.templates/basic/dom_builder_shapes.rb