Sha256: 7fce08785b03d64bf32f84640ede08df31a48217b9ad9e6863a8ae639daca189
Contents?: true
Size: 740 Bytes
Versions: 30
Compression:
Stored size: 740 Bytes
Contents
module Zafu module Meta def r_debug return '' unless @context[:dev] add_html_class('debug') out "<p>#{@params[:title] || @params[:message]}</p>" if @params[:title] || @params[:message] (@params[:show] || '').split(',').map(&:strip).each do |what| case what when 'params' out "<pre><%= params.inspect %></pre>" when 'class' out "<pre>expected: #{node_class} / got: <%= #{node}.class %></pre>" else parser_error("invalid element to show. Options are ['params', 'class'].") end end out expand_with end def parser_error(message, tag=@method) "<span class='parser_error'>[#{tag}] #{message}</span>" end end end
Version data entries
30 entries across 30 versions & 1 rubygems