Sha256: 76a1cd89b9be842aa09c9a72bc40f3e2795f709b0937655991d209a2f2aa1292

Contents?: true

Size: 659 Bytes

Versions: 4

Compression:

Stored size: 659 Bytes

Contents

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_tag(name, attrs, content = nil)
        result = [:html, :tag, name, compile(attrs)]
        content ? (result << compile(content)) : result
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
temple-0.6.0 lib/temple/html/dispatcher.rb
temple-0.5.5 lib/temple/html/dispatcher.rb
temple-0.5.4 lib/temple/html/dispatcher.rb
temple-0.4.1 lib/temple/html/dispatcher.rb