Module: Serif::Filters
- Defined in:
- lib/serif/site.rb
Instance Method Summary collapse
- #encode_uri_component(string) ⇒ Object
- #markdown(body) ⇒ Object
- #smarty(text) ⇒ Object
- #strip(input) ⇒ Object
- #xmlschema(input) ⇒ Object
Instance Method Details
#encode_uri_component(string) ⇒ Object
7 8 9 10 |
# File 'lib/serif/site.rb', line 7 def encode_uri_component(string) return "" unless string CGI.escape(string) end |
#markdown(body) ⇒ Object
16 17 18 |
# File 'lib/serif/site.rb', line 16 def markdown(body) Serif::Markdown.render(body) end |
#smarty(text) ⇒ Object
12 13 14 |
# File 'lib/serif/site.rb', line 12 def smarty(text) RubyPants.new(text).to_html end |
#strip(input) ⇒ Object
3 4 5 |
# File 'lib/serif/site.rb', line 3 def strip(input) input.strip end |
#xmlschema(input) ⇒ Object
20 21 22 |
# File 'lib/serif/site.rb', line 20 def xmlschema(input) input.xmlschema end |