Module: Jekyll::Filters
- Defined in:
- lib/jekyll/filters.rb
Instance Method Summary collapse
- #date_to_long_string(date) ⇒ Object
- #date_to_string(date) ⇒ Object
- #date_to_xmlschema(date) ⇒ Object
- #number_of_words(input) ⇒ Object
- #xml_escape(input) ⇒ Object
Instance Method Details
#date_to_long_string(date) ⇒ Object
8 9 10 |
# File 'lib/jekyll/filters.rb', line 8 def date_to_long_string(date) date.strftime("%d %B %Y") end |
#date_to_string(date) ⇒ Object
4 5 6 |
# File 'lib/jekyll/filters.rb', line 4 def date_to_string(date) date.strftime("%d %b %Y") end |
#date_to_xmlschema(date) ⇒ Object
12 13 14 |
# File 'lib/jekyll/filters.rb', line 12 def date_to_xmlschema(date) date.xmlschema end |
#number_of_words(input) ⇒ Object
20 21 22 |
# File 'lib/jekyll/filters.rb', line 20 def number_of_words(input) input.split.length end |
#xml_escape(input) ⇒ Object
16 17 18 |
# File 'lib/jekyll/filters.rb', line 16 def xml_escape(input) input.gsub("<", "<").gsub(">", ">") end |