Class: Inversion::Template::UriencodeTag

Inherits:
AttrTag show all
Includes:
Escaping
Defined in:
lib/inversion/template/uriencodetag.rb

Overview

Inversion URL encoding tag.

This tag is a derivative of the ‘attr’ tag that encodes the results of its method call according to RFC 3986.

Syntax

<?uriencode 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.



23
24
25
26
# File 'lib/inversion/template/uriencodetag.rb', line 23

def render( render_state )
	raw = super
	return escape_uri( raw.to_s )
end