Class: Inversion::Template::UriencodeTag
- 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
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.
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 |