public
Rubygem
Description: Liquid markup language. Save, customer facing template language for flexible web apps.
Homepage: http://www.liquidmarkup.org
Clone URL: git://github.com/tobi/liquid.git
Click here to lend your support to: liquid and make a donation at www.pledgie.com !
liquid / lib / liquid / extensions.rb
100644 56 lines (46 sloc) 0.575 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
require 'time'
require 'date'
 
class String # :nodoc:
  def to_liquid
    self
  end
end
 
class Array # :nodoc:
  def to_liquid
    self
  end
end
 
class Hash # :nodoc:
  def to_liquid
    self
  end
end
 
class Numeric # :nodoc:
  def to_liquid
    self
  end
end
 
class Time # :nodoc:
  def to_liquid
    self
  end
end
 
class DateTime < Date # :nodoc:
  def to_liquid
    self
  end
end
 
class Date # :nodoc:
  def to_liquid
    self
  end
end
 
def true.to_liquid # :nodoc:
  self
end
 
def false.to_liquid # :nodoc:
  self
end
 
def nil.to_liquid # :nodoc:
  self
end