Sha256: 8f7dcd0d31bcdebd70aa2a5c1581043c490d5c5ab4af6258976f1f09089aa111

Contents?: true

Size: 394 Bytes

Versions: 5

Compression:

Stored size: 394 Bytes

Contents

# frozen_string_literal: true

module Bemer
  module Builders
    class Tree
      class Element
        def initialize(tree, block)
          @tree  = tree
          @block = block
        end

        def elem(name = '', **options, &content)
          tree.add_node(block, name, options, &content)
        end

        protected

        attr_reader :tree, :block
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bemer-0.5.0 lib/bemer/builders/tree/element.rb
bemer-0.4.0 lib/bemer/builders/tree/element.rb
bemer-0.3.0 lib/bemer/builders/tree/element.rb
bemer-0.2.0 lib/bemer/builders/tree/element.rb
bemer-0.1.0 lib/bemer/builders/tree/element.rb