2 # Wrapping a string in this class gives you a prettier way to test
3 # for equality. The value returned by <tt>Rails.env</tt> is wrapped
4 # in a StringInquirer object so instead of calling this:
6 # Rails.env == "production"
10 # Rails.env.production?
12 class StringInquirer
< String
13 def method_missing(method_name
, *arguments
)
14 if method_name
.to_s
[-1,1] == "?"
15 self == method_name
.to_s
[0..-2]