Sha256: 9a4769562174a4865b04216ffaa6b402e0b0d8c4079794d06ad93f2adafc16ba

Contents?: true

Size: 456 Bytes

Versions: 9

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

module DrawioDsl
  # DrawioDsl::Shapes is a list of DSL methods (one per shape)
  # :nocov:
  module DrawioShapes
    def random(**opts)
      case rand({{shape_length}})
      {{#each shapes}}
      when {{@index}}
        {{snake ./type}}(**opts)
      {{/each}}
      end
    end
    {{#each shapes}}

    def {{snake ./type}}(**opts)
      builder.add_{{snake ./type}}(**opts)
    end
    {{/each}}
  end
  # :nocov:
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
drawio_dsl-0.6.0 .builders/.templates/basic/drawio_shapes.rb
drawio_dsl-0.5.7 .builders/.templates/basic/drawio_shapes.rb
drawio_dsl-0.5.6 .builders/.templates/basic/drawio_shapes.rb
drawio_dsl-0.5.5 .builders/.templates/basic/drawio_shapes.rb
drawio_dsl-0.5.4 .builders/.templates/basic/drawio_shapes.rb
drawio_dsl-0.5.3 .builders/.templates/basic/drawio_shapes.rb
drawio_dsl-0.5.2 .builders/.templates/basic/drawio_shapes.rb
drawio_dsl-0.5.1 .builders/.templates/basic/drawio_shapes.rb
drawio_dsl-0.5.0 .builders/.templates/basic/drawio_shapes.rb