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

Version Path
zena-1.2.8 old_zafu/meta.rb
zena-1.2.7 old_zafu/meta.rb
zena-1.2.6 old_zafu/meta.rb
zena-1.2.5 old_zafu/meta.rb
zena-1.2.4 old_zafu/meta.rb
zena-1.2.3 old_zafu/meta.rb
zena-1.2.2 old_zafu/meta.rb
zena-1.2.1 old_zafu/meta.rb
zena-1.2.0 old_zafu/meta.rb
zena-1.1.3 old_zafu/meta.rb
zena-1.1.2 old_zafu/meta.rb
zena-1.1.1 old_zafu/meta.rb
zena-1.1.0 old_zafu/meta.rb
zena-1.0.0 old_zafu/meta.rb
zena-1.0.0.rc3 old_zafu/meta.rb
zena-1.0.0.rc2 old_zafu/meta.rb
zena-1.0.0.rc1 old_zafu/meta.rb
zena-0.16.9 lib/zafu/meta.rb
zena-1.0.0.beta3 old_zafu/meta.rb
zena-0.16.8 lib/zafu/meta.rb