Sha256: 8cd1aa583470a01fdb02bb93c367bc893fa0bd0fddd44ca02a3277b93e0a690f

Contents?: true

Size: 769 Bytes

Versions: 10

Compression:

Stored size: 769 Bytes

Contents

# frozen_string_literal: true
module Temple
  module HTML
    # @api private
    module Dispatcher
      def on_html_attrs(*attrs)
        [:html, :attrs, *attrs.map {|a| compile(a) }]
      end

      def on_html_attr(name, content)
        [:html, :attr, name, compile(content)]
      end

      def on_html_comment(content)
        [:html, :comment, compile(content)]
      end

      def on_html_condcomment(condition, content)
        [:html, :condcomment, condition, compile(content)]
      end

      def on_html_js(content)
        [:html, :js, compile(content)]
      end

      def on_html_tag(name, attrs, content = nil)
        result = [:html, :tag, name, compile(attrs)]
        content ? (result << compile(content)) : result
      end
    end
  end
end

Version data entries

10 entries across 9 versions & 3 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/html/dispatcher.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/temple-0.10.3/lib/temple/html/dispatcher.rb
brakeman-7.0.0 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/html/dispatcher.rb
brakeman-6.2.2 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/html/dispatcher.rb
brakeman-6.2.2.rc1 bundle/ruby/3.3.0/gems/temple-0.10.3/lib/temple/html/dispatcher.rb
brakeman-6.2.1 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/html/dispatcher.rb
brakeman-6.2.0 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/html/dispatcher.rb
temple-0.10.3 lib/temple/html/dispatcher.rb
temple-0.10.2 lib/temple/html/dispatcher.rb
temple-0.10.1 lib/temple/html/dispatcher.rb