Class: Inversion::Template::PpTag
- 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
Instance Attribute Summary
Attributes inherited from AttrTag
Attributes inherited from CodeTag
Attributes inherited from Tag
Attributes inherited from Node
Instance Method Summary collapse
-
#render(render_state) ⇒ Object
Render the method chains against the attributes of the specified ‘render_state` and return them.
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
Methods included from AbstractClass::ClassMethods
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 |