Sha256: b775219f33f975ec338b020a6f8c75783ab639f2c3ebceb07921de6d7c0388d9

Contents?: true

Size: 394 Bytes

Versions: 1

Compression:

Stored size: 394 Bytes

Contents

# frozen_string_literal: true

module LiquidDiagrams
  # @note All blocks are automaticly define under this module if not defined
  module Blocks
    Renderers.constants.grep(/Renderer$/).each do |renderer|
      block_name = "#{renderer.to_s.chomp('Renderer')}Block"

      next if Blocks.const_defined?(block_name)

      Blocks.const_set(block_name, Class.new(BasicBlock))
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
liquid-diagrams-0.4.0 lib/liquid_diagrams/blocks.rb