Module: Henshin::LiquidPlugin::Filters

Defined in:
lib/henshin/plugins/liquid.rb

Instance Method Summary collapse

Instance Method Details

#date_to_long(dt) ⇒ Object



25
26
27
# File 'lib/henshin/plugins/liquid.rb', line 25

def date_to_long(dt)
  dt.strftime "%d %B %Y at %H:%M"
end

#date_to_string(dt) ⇒ Object



21
22
23
# File 'lib/henshin/plugins/liquid.rb', line 21

def date_to_string(dt)
  dt.strftime "%d %b %Y"
end

#escape(str) ⇒ Object



37
38
39
# File 'lib/henshin/plugins/liquid.rb', line 37

def escape(str)
  CGI::escape str
end

#escape_html(str) ⇒ Object



41
42
43
# File 'lib/henshin/plugins/liquid.rb', line 41

def escape_html(str)
  CGI::escapeHTML str
end

#time_to_string(dt) ⇒ Object



29
30
31
# File 'lib/henshin/plugins/liquid.rb', line 29

def time_to_string(dt)
  dt.strtime "%H:%M"
end

#titlecase(str) ⇒ Object



33
34
35
# File 'lib/henshin/plugins/liquid.rb', line 33

def titlecase(str)
  str.upcase
end