Class: Inversion::Template::PpTag

Inherits:
CallTag show all
Includes:
Escaping
Defined in:
lib/inversion/template/pptag.rb

Overview

Inversion object inspection tag.

This tag dumps the result of the attribute or method chain.

Syntax

<?pp foo.bar ?>

Constant Summary

Constants included from Escaping

Escaping::DEFAULT_ESCAPE_FORMAT, Escaping::URI_ENCODED_CHARACTERS

Constants inherited from Tag

Tag::TAG_PLUGIN_PATTERN

Instance Attribute Summary

Attributes inherited from AttrTag

#format, #methodchain, #name

Attributes inherited from CodeTag

#body, #identifiers

Attributes inherited from Tag

#body

Attributes inherited from Node

#colnum, #linenum

Instance Method Summary collapse

Methods included from Escaping

#escape, #escape_html, #escape_uri, included

Methods inherited from AttrTag

#as_comment_body, #evaluate, #initialize

Methods inherited from CodeTag

inherit_tag_patterns, #initialize, tag_pattern, tag_patterns

Methods included from AbstractClass

included

Methods included from AbstractClass::ClassMethods

#inherited, #pure_virtual

Methods inherited from Tag

#as_comment_body, create, #derivatives, inherited, #initialize, load, load_all, #tagname, types, #types

Methods included from MethodUtilities

#singleton_attr_accessor, #singleton_attr_reader, #singleton_attr_writer

Methods inherited from Node

#after_appending, #after_rendering, #as_comment_body, #before_appending, #before_rendering, #initialize, #is_container?, #location

Constructor Details

This class inherits a constructor from Inversion::Template::AttrTag

Instance Method Details

#render(render_state) ⇒ Object

Render the method chains against the attributes of the specified ‘render_state` and return them.



21
22
23
24
25
26
# File 'lib/inversion/template/pptag.rb', line 21

def render( render_state )
	raw = super
	buf = String.new( '' )
	PP.pp( raw, buf )
	return self.escape( buf.chomp, render_state )
end